Traits in a template enum
Some Guy
someguy at mailinator.com
Sun Oct 10 12:56:30 UTC 2021
On Sunday, 10 October 2021 at 12:48:49 UTC, Adam D Ruppe wrote:
> On Sunday, 10 October 2021 at 12:39:17 UTC, Some Guy wrote:
>> I have this enum to get the type
>
> enums hold values, not types.
>
> try alias instead
Thanks! `alias typeOfMember(T, string member) =
typeof(__traits(getMember, T, member));` works.
But I did not understand what you meant by "enums hold values,
not types". Aren't types values at compile time?
More information about the Digitalmars-d-learn
mailing list