You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using wise_enum library and i have a requirement to distinguish if something is an enum class or plain vanilla enum at compile time. wise enum provides a way to check if something is a wise_enum, which also implicitly means that it can tell us if something is an enumeration type. This is because wise_enum creates an actual scoped or unscoped class.
I looked into C++ standard to check if there is an existing type-trait that distinguishes between enum class and vanilla enum.
i found :
std::is_enum // again does not distinguish between scoped and unscoped enums
std::is_scoped_enum // exactly what i need, but unfortunately it's proposed for C++23
I think i am going to end up implementing this on my own. But i think it adds value to wise_enum also if it has this kind of type introspection available as C++23 is still a few years i think.
I am happy to add this enhancement to WISE_ENUM as well.
Interested in some feedback here!
Cheers
The text was updated successfully, but these errors were encountered:
I am using wise_enum library and i have a requirement to distinguish if something is an enum class or plain vanilla enum at compile time. wise enum provides a way to check if something is a wise_enum, which also implicitly means that it can tell us if something is an enumeration type. This is because wise_enum creates an actual scoped or unscoped class.
I looked into C++ standard to check if there is an existing type-trait that distinguishes between enum class and vanilla enum.
i found :
std::is_enum // again does not distinguish between scoped and unscoped enums
std::is_scoped_enum // exactly what i need, but unfortunately it's proposed for C++23
I think i am going to end up implementing this on my own. But i think it adds value to wise_enum also if it has this kind of type introspection available as C++23 is still a few years i think.
I am happy to add this enhancement to WISE_ENUM as well.
Interested in some feedback here!
Cheers
The text was updated successfully, but these errors were encountered: