but enums are not as type-safe as we might like. For example, enums can be used like
ints (see Item 2).
- 4. Designs and Declarations
- from Effective C++: 55 Specific Ways to Improve Your Programs and Designs, Third Edition
- Publisher: Addison-Wesley Professional
- Released: May 2005
This problem is resolved by using enum classes, rather than plain enums.
Share this highlighthttp://www.safaribooksonline.com/a/effective-c-55/2336709/