Get most D type from type
Hussien via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Mar 17 16:54:36 PDT 2017
I am using Parameters and ReturnType which give me the "name" of
the type used. e.g.,
int foo(SomeEnum)
will give SomeEnum and int for the type respectively.
What I need to do, is also get the D types that these use.
int is int, but SomeEnum is an enum.
Is there a traits function or some way to reduce the derived type
to it's most primitive D type?
A specific class should give "class", some enum should give
"enum", an interface "interface", a function should give
"function", etc.
More information about the Digitalmars-d-learn
mailing list