Comparison chart of D and C++ templates
janderson
askme at me.com
Sat Jan 20 12:44:50 PST 2007
janderson wrote:
> Walter Bright wrote:
>> janderson wrote:
>>> Walter Bright wrote:
>>>> http://www.digitalmars.com/d/template-comparison.html
>>>>
>>>> Comments?
>>>
>>> What about automatic induction? You probably want to link to a
>>> reason why D doesn't have it (since it will probably be questioned
>>> again and again). You could also mention how aliasing can go some
>>> way to solving this difference.
>>
>> What is automatic induction?
>
>
> Sorry, I mean like:
>
> template <class C>
> void Get(C& c) {}
>
> ...
> int X = 0;
> Get(X);
>
> float Y = 0;
> Get(Y);
>
> No need to specify the types.
>
I think its called "Type induction".
-Joel
More information about the Digitalmars-d-announce
mailing list