can I generate an enum from a typelist?
Vlad Levenfeld
vlevenfeld at gmail.com
Tue Apr 8 01:31:15 PDT 2014
Ok, starting to feel a bit sheepish at this point, that
constructor was unnecessarily verbose:
this (T) (T layer)
{
import std.string: toLower;
mixin ("this."~toLower (T.stringof)~"= layer;");
this.type = cast (const) typeid (T);
}
...is what I have settled on.
Sorry for all the noise! There doesn't seem to be a way to edit
posts here...
More information about the Digitalmars-d-learn
mailing list