SFINAE(substitution failure is not an error),即匹配失败不是错误
#include <iostream>
using namespace std;
struct Test
{
typedef int type;
};
template <typename T>
void f(typename T::type)
{
cout<< "one" <<endl;
}
template<typename T>
void f(T)
{
cout<< "two" <<endl;
}
void main()
{
f<Test>(10);
f<int>(10);
}