__traits and determining all overridable functions

Steven Schveighoffer schveiguy at yahoo.com
Mon Nov 12 09:12:15 PST 2007


"Christopher Wright" wrote
> You can't foreach an array at compile time, and __traits(allMembers) 
> returns an array. You can index an array at compile time, but again, you 
> can't use a while loop at compile time.
>
> You have to use recursion.
>
> Eventually, static foreach should be able to do this. Or you can bug 
> Walter about changing allMembers to return a tuple of strings.
>

Is static foreach a planned feature?  This sounds like it would be much 
preferrable to the recursion.

-Steve 





More information about the Digitalmars-d mailing list