Generating an enum from a tuple of Types?
Johannes Pfau
nospam at example.com
Sat Jan 25 10:58:54 PST 2014
Am Sat, 25 Jan 2014 18:55:54 +0100
schrieb Artur Skawina <art.08.09 at gmail.com>:
>
> Well, if you don't need names then just use the index directly.
>
> Eg, see 'DiscUnion.type' in
>
> http://forum.dlang.org/thread/mtkzbwfgwsstndxbesgy@forum.dlang.org#post-mailman.555.1377703234.1719.digitalmars-d-learn:40puremagic.com
>
> (A newer compiler may allow for that offset-of calculation at CT)
>
> artur
Thanks for all the answers, I guess I'll keep the string mixin.
I don't really need the names but I need the enum to support final
switch.
More information about the Digitalmars-d-learn
mailing list