Try to understand SFINAE.
template <class T, class T1 = void>
struct foo
{
static constexpr char* a = "primary definition\n";
};
struct A
{
};
template <class T>
struct foo<T, std::enable_if<std::is_same<T, A>::value>::type>
{
static constexpr char* a = "secondary definition\n";
};
Compiler gcc-4.8.1 gives an error
error: type/value mismatch at argument 2 in template parameter list for ‘template struct foo’ struct foo::value>::type>