#include <iostream>
#include <type_traits>
#include <utility>

// Mutually exclusive enable_if test
template<typename T, typename std::enable_if<std::is_integral<T>::value, int>::type = 0>
void foo(T)
{
    std::cout << "Integral\n";
}

template<typename T, typename std::enable_if<! std::is_integral<T>::value && sizeof(T) <= 4, int>::type = 0>
void foo(T)
{
    std::cout << "Not integral, <= 4\n";
}

template<typename T, typename std::enable_if<! std::is_integral<T>::value && (sizeof(T) > 4), int>::type = 0>
void foo(T)
{
    std::cout << "Not integral, > 4\n";
}

int main()
{
    foo(3);
    foo(0.0);
    foo(0.0f);
}