Very minor Enum proposal
Bill Baxter
dnewsgroup at billbaxter.com
Mon Apr 23 19:49:48 PDT 2007
I know there has been a lot of debris flying about fancy enums able to
stringize their values etc, but I have a much more modest proposal.
I'd like to be able to get the value of an enum member as a the
underlying type via a property, say '.val'.
This would allow me to use something like this:
const x = MyEnum.AMember.val;
Instead of this:
const x = cast(typeof(MyEnum.init)) MyEnum.AMember;
--bb
More information about the Digitalmars-d
mailing list