Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <type_traits>
- namespace details {
- template<typename Type, bool IsEnum = std::is_enum<Type>::value>
- struct underlying_type : std::underlying_type<Type> { };
- template<typename Type>
- struct underlying_type<Type, false> { };
- }
- template<typename Type>
- struct underlying_type : details::underlying_type<Type> { };
- template<typename Type>
- using underlying_type_t = typename underlying_type<Type>::type;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement