why aren't strongly typed C++0x enumerations comparable to each other?
+5
A:
If you use strongly typed enumerations, it's like making your enum a realy type, a class. Then it follows the same rules as for classes.
Classes instances can't be compared to each other. You have to define a comparison function (or member function) to make them comparable.
Then making an enumeration strongly typed makes it follows this very rule.
Klaim
2010-06-13 00:58:57