What about this...

downs default_357-line at yahoo.de
Tue Jan 15 04:54:49 PST 2008


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


More information about the Digitalmars-d-learn mailing list