18 Jun
2014
18 Jun
'14
8:01 a.m.
Hello, The syntax is quite messy, but it can be hidden. However I think, it is too complicated and the same can be achieved in simpler way. I personally use slightly modified flags from http://sourceforge.net/projects/lordodinscpplib/ It is simple macro to generate necessary operators for a scoped enum. Unfortunately, this code requires C++11 and I am not sure if this can be rewritten for older compilers. There is some implementation of scoped enums in boost, so it may work. But type safe flags are common enough to be part of boost. The implementation details are just a matter of taste. I would use flags from boost myself. Jiří