The FAQ page ..

Bruno Medeiros brunodomedeirosATgmail at SPAM.com
Tue Aug 8 11:05:33 PDT 2006


Walter Bright wrote:
> Thanks to both of you, I'll make corrections.

I know one more in http://digitalmars.com/d/cpptod.html ,Type Traits, 
the following D code is wrong in one or more ways (this is where I found 
bug #270) :

----
template IsFunctionT(T)
{
     static if ( is(T[]) )
	const int IsFunctionT = 1;
     else
	const int IsFunctionT = 0;
}

void test()
{
     typedef int fp(int);

     assert(IsFunctionT!(fp) == 1);
}
----

-- 
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list