Re: Intelligent enums

2017-01-18 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 19 January 2017 at 03:47:34 UTC, Ignacious wrote: On Thursday, 19 January 2017 at 02:59:04 UTC, Ignacious wrote: I have the need to create an enum flag like structure to specify certain properties of a type easily. e.g., enum properties { Red, Blue, Hot, Sexy,

Intelligent enums

2017-01-18 Thread Ignacious via Digitalmars-d-learn
I have the need to create an enum flag like structure to specify certain properties of a type easily. e.g., enum properties { Red, Blue, Hot, Sexy, Active, ... } But some properties will be mutually exclusive. I would like to contain all those rules for in the enum itself