template<typename T, bool = std::is_arithmetic_v<T>>
class Expression;
template <typename T>
class Expression<T, false>
{ };
template <typename T>
class Expression<T, true>
{ };
The first template checks if Expression<type> object is arithmetic or not. If it is, then the second class is called, if not, then the third.
However, I don't want is_arithmetic in there. I want to perform my own checks. For example, check to see if type is int, or char only. So something like this:
1 2 3 4 5 6 7 8 9 10
template<typename T, if(T == int || T == char) returntrue; elsereturnfalse;>
class Expression;
template <typename T>
class Expression<T, false>
{ };
template <typename T>
class Expression<T, true>
{ };