With the following code I can check at compile time if type E is an enum:
static_assert(true == std::is_enum<E>::value, "Must be an enum");
How can I check if it is an enum class
?
Here they suggest to add the check !std::is_convertible<T, int>::value
, but it looks like a trick. Is there a better way?