C++ enum class does not have operator<< defined.
Therefore CHECK_EQ(a, b) and similar macros won't work if a, b are enum class types.
(Note that the C-style enum works around this via the implicit conversion to int, which has operator<< defined.)
Should we build CHECK_EQ support for enum class types which do not have operator<< defined? Or is the way to go to define
std::ostream& operator<<(std::ostream& os, const T& e) {
return os << static_cast<int>(e);
}
for every enum class type T separately?