On Thursday, 26 January 2017 at 05:58:26 UTC, Profile Anaysis
wrote:
Since we do not have attributes for enums, I use _ in front of
the names for meta values.
I need to get the non-meta values for the enum so I can iterate
over it and use it properly.
enum myEnum
{
_Meta1 = 0,
A,B,C,
On Thursday, 26 January 2017 at 05:58:26 UTC, Profile Anaysis
wrote:
Since we do not have attributes for enums, I use _ in front of
the names for meta values.
[...]
This can be done with Ctfe mixins and __traits,
look at __traits(allMembers)
Since we do not have attributes for enums, I use _ in front of
the names for meta values.
I need to get the non-meta values for the enum so I can iterate
over it and use it properly.
enum myEnum
{
_Meta1 = 0,
A,B,C,
_Meta3 = 43,
D = 3,
}
The num, for all practical purposes do