If I have a template class, like so:
template<typename T>
class Type { /* ... */ };
Without modifying Type in any way, is there a simple way to specialize it for all such types that match a compile-time condition? For example, if I wanted to specialize Type for all integral types, I’d like to do something like this (only something that works, that is):
template<typename T>
class Type<std::enable_if<std::is_integral<T>, T>::type> { /* ... */ };
This should work: