Traits problem
bearophile
bearophileHUGS at lycos.com
Sat Dec 5 09:55:10 PST 2009
Daniel Ribeiro Maciel:
Note that this foreach is a static foreach because members is a tuple, it's not an array:
> void exportObject( TClass, members... )()
> {
> foreach( uint i, member; members )
> writeln( typeid(typeof(__traits(getVirtualFunctions, Foo, members[i]) )) );
> }
I hope the the future real static foreach will work on enum (constant) arrays too.
Bye,
bearophile
More information about the Digitalmars-d
mailing list