On Tuesday, 29 October 2013 at 21:24:35 UTC, bearophile wrote:
Maxim Fomin:
Bools being integer types is reason of your problem with enums.
The reason of that problem of mine with enums is that they
convert implicitly to integers. And I still don't know the
original rationale of Walter of this design mistake.
Bye,
bearophile
It works according to spec: "A named enum member can be
implicitly cast to its EnumBaseType, but EnumBaseType types
cannot be implicitly cast to an enum type. "
In this respect D enums behave like C enums.