What about this...

Aarti_pl aarti at interia.pl
Tue Jan 15 05:11:41 PST 2008


downs pisze:
> Aarti_pl wrote:
>> Any comments on this? Probably error, but maybe someone wants to add
>> something...
>>
>> --------
>>
>> void pattern(T)(T v) {}
>>
>> T pattern(T)() {return T.init;}
>>
>> void main() {
>>     pattern!(int)(5);
>> }
>>
>> ---------
> 
> There's a dirty, dirty but working work-around for this :)
> 
> T pattern(T)() { return T.init; }
> void pattern(T, BOGUS=void)(T v) { }
> 
> then just use IFTI for the second one.
> 
>  --downs

Thanks! Nice to know it!

BR
Marcin Kuszczak
(aarti_pl)


More information about the Digitalmars-d-learn mailing list