Re: compile time method check

2008-12-27 Thread Weed
Bill Baxter пишет: > 2008/12/27 Weed : >> Simen Kjaeraas пишет: >>> On Fri, 26 Dec 2008 20:15:30 +0100, Weed wrote: >>> Can I at compile time check whether there is a facility method (toString(), for example)? Today I wrote: static if ( __traits(isArit

Re: compile time method check

2008-12-27 Thread Bill Baxter
2008/12/27 Weed : > Simen Kjaeraas пишет: >> On Fri, 26 Dec 2008 20:15:30 +0100, Weed wrote: >> >>> Can I at compile time check whether there is a facility method >>> (toString(), for example)? >>> >>> Today I wrote: >>> >>> static if ( __traits(isArithmetic, Element) ) { >>>

Re: compile time method check

2008-12-26 Thread Weed
Simen Kjaeraas пишет: > On Fri, 26 Dec 2008 20:15:30 +0100, Weed wrote: > >> Can I at compile time check whether there is a facility method >> (toString(), for example)? >> >> Today I wrote: >> >> static if ( __traits(isArithmetic, Element) ) { >> ret ~= toStri

Re: compile time method check

2008-12-26 Thread Bill Baxter
On Sat, Dec 27, 2008 at 6:30 AM, Simen Kjaeraas wrote: > On Fri, 26 Dec 2008 20:15:30 +0100, Weed wrote: > >> Can I at compile time check whether there is a facility method >> (toString(), for example)? >> >> Today I wrote: >> >>static if ( __traits(isArithmetic, Element) ) { >>

Re: compile time method check

2008-12-26 Thread Simen Kjaeraas
On Fri, 26 Dec 2008 20:15:30 +0100, Weed wrote: Can I at compile time check whether there is a facility method (toString(), for example)? Today I wrote: static if ( __traits(isArithmetic, Element) ) { ret ~= toString(this[i,j]) ~ "\t"; } els

compile time method check

2008-12-26 Thread Weed
Can I at compile time check whether there is a facility method (toString(), for example)? Today I wrote: static if ( __traits(isArithmetic, Element) ) { ret ~= toString(this[i,j]) ~ "\t"; } else { ret ~= this[i,j].toString ~