"bearophile" <[email protected]> wrote in message news:[email protected]... > Robert Fraser: >> typedef int _MyEnum; >> enum MyEnum : _MyEnum >> { >> FOO, >> BAR >> } > > Isn't it better for all enums to behave like this (and require a cast to > be used as their base types)? >
Yes. I also was unaware of this behavior and am rather dissapointed by it. This just smacks of the old problematic C-style weak-typing that I've spent years trying to avoid. I shouldn't need an idiom to do things the safe/correct way.
