C++11: Replacing unscoped enums with scoped enums

2015-08-13 Thread Murray Cumming
C++11 lets us use this: enum class SomeEnum { VALUE_A, VALUE_B } instead of the old way: enum SomeEnum { SOME_ENUM_VALUE_A, SOME_ENUM_VALUE_B } So, you'd then use SomeEnum::VALUE_A instead of SOME_ENUM_VALUE_A. That's nicer, avoids some namespace pollution, and also lets us declare

Re: C++11: Replacing unscoped enums with scoped enums

2015-08-13 Thread Krzysztof KosiƄski
2015-08-13 10:56 GMT+02:00 Murray Cumming murr...@murrayc.com: C++11 lets us use this: enum class SomeEnum { VALUE_A, VALUE_B } instead of the old way: enum SomeEnum { SOME_ENUM_VALUE_A, SOME_ENUM_VALUE_B } So, you'd then use SomeEnum::VALUE_A instead of SOME_ENUM_VALUE_A.