I had this question on a test.
I know that I can do something like:
enum class Color { red, green = 1, blue };
Color c = Color::blue;
if( c == Color::blue )
cout << "blue\n";
But when I replace cout << "blue\n";
with cout << Color::green
, it doesn't even compile. Why doesn't it compile?