How can one implement type trait whose value member is true if and only if the passed in type T is a class enum? While I know that for instance
+T{};
will work if T is an enum and fail if it is an enum class, I couldn't find a way so far to use this for SFINAE.
Based on your
+T{}
test:Option #1:
Expression SFINAE in trailing return type:
DEMO
Option #2:
In void_t-fashion:
DEMO 2
Tests: