How can I write a using (or typedef) declaration that is dependent on a template argument?
I would like to achieve something like this:
template<typename T>
class Class
{
// T can be an enum or an integral type
if constexpr (std::is_enum<T>::value) {
using Some_type = std::underlying_type_t<T>;
} else {
using Some_type = T;
}
};