Something is wrong with the following code, can you spot what it is? (If in doubt, try compiling it.)
enum class Color { red = 1, green = 2, blue = 4 };
auto yellow = Color::red | Color::green;
As you may have found out, the compiler complains with a message such as: error: no match for 'operator|' (operand types are 'Color' and 'Color'). The simplistic solution is to remove the class keyword, and use the “plain” enum type, where the enumerators are implicitly convertible to and from int.