How to get BaseEnumType?
drug via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Aug 31 00:54:33 PDT 2015
Hello
I need to get the type to which I can cast the enum for using with
foreign library. For example:
```
enum Foo { A = "a", B = "b", }
enum Bar { A = 123, B = 432, }
static assert(is(BaseEnumType!Foo == string));
static assert(is(BaseEnumType!Bar == int));
I guess there is simple answer somewhere but I failed to find it yet.
More information about the Digitalmars-d-learn
mailing list