This might be what you're looking for, i.e. tag dispatching:
template<typename T, bool = is_integral<T>::value>
struct number_validator {};
template<typename T>
struct number_validator<T, true>
{
typedef integral_validator type;
};
template<typename T>
struct number_validator<T, false>
{
typedef floating_point_validator type;
};
This assumes that you really operate on numbers, so the types are always either integral or floating point.