O'Reilly logo
  • Ben Medina thinks this is interesting:

but enums are not as type-safe as we might like. For example, enums can be used like ints (see Item 2).


Cover of Effective C++: 55 Specific Ways to Improve Your Programs and Designs, Third Edition


This problem is resolved by using enum classes, rather than plain enums.