IFTI

Jari-Matti Mäkelä jmjmak at utu.fi.invalid
Fri Nov 9 08:51:50 PST 2007


BCS wrote:

> Reply to Bill,
> 
>> Kirk McDonald wrote:
>> 
>>> Bruce Adams wrote:
>>> 
>>>> Okay, I give up. I've been trying to figure out what this FLA stands
>>>> for since I first saw it turn up a few threads ago. Someone please
>>>> put me out of my mystery. IMHO IIOTMCAG. <- LAAEFTR
>>>> 
>>>> Regards,
>>>> 
>>>> Bruce.
>>>> 
>>> Implicit Function Template Instantiation
>>> 
>>> The ability to, given a function template:
>>> 
>>> void foo(T)(T t) {}
>>> 
>>> Call it without explicitly providing the types of the arguments:
>>> 
>>> foo(12);
>>> foo("apples");
>> I think in C++ land they get by just calling it "implicit
>> instantiation", right?  Anyone been around here long enough to know
>> why D has it's own acronym for this?
>> 
>> --bb
>> 
> 
> I think the "Function Template" comes from the fact that it is just for
> function templates. Either that or because "implicit instantiation" is to
> long and II is to ambiguous.

Hmm, you could extend it to classes too:

class Foo(T) {
  this(T t) { }
}

void foo() {
  auto bar = new Foo(5);
}




More information about the Digitalmars-d mailing list