Need trait of isPod.
Marcin Kuszczak
aarti_nospam at please_interia.pl
Tue Oct 9 14:50:57 PDT 2007
Paolo Invernizzi wrote:
> Not related... but what's the expression for testing an associative
> array? DMD 1.0 please...
>
> Paolo
>
I found following template in Tango core/Traits.d:
private template isAssocArrayType( T )
{
const bool isAssocArrayType = is( typeof(T.init.values[0]
[typeof(T.init.keys[0])] == T );
}
I don't know if it really works (why is there private access qualifier???).
Probably better answer could give Tango people... and tests of course :-)
--
Regards
Marcin Kuszczak (Aarti_pl)
-------------------------------------
Ask me why... I believe in Jesus - http://www.zapytajmnie.com (en/pl)
Doost (port of few Boost libraries) - http://www.dsource.org/projects/doost/
-------------------------------------
More information about the Digitalmars-d
mailing list