Suggestion: auto templates

nick nick.atamas at gmail.com
Sun Feb 19 09:07:31 PST 2006


It's a variation on it.

bobef wrote:
> Hasan Aljudy wrote:
>> bobef wrote:
>>> It would be nice if there were something like auto templates. I.e. if
>>> we have something like:
>>>
>>> template mytemplate(_type)
>>> {
>>>     int foo(_type[] ar);
>>>     int boo(_type ar);
>>> }
>>>
>>>
>>> and type something like
>>>
>>> char[] a;
>>> foo(a);
>>> //or even
>>> mytemplate.boo(a[0]);
>>>
>>> DMD could autodetect the type and we won't need to specify the type
>>> every time manualy.
>>
>> is this the infamouse implicit template instantiation?
> 
> I don't know.



More information about the Digitalmars-d mailing list