我有这样的事情:
typedef int AnotherType;
template <typename T> Func( T Value );
// And I want to specialize these two cases separately:
template <> bool Func<int>( int Value ) {...}
template <> bool Func<AnotherType>( AnotherType Value ) {...}
我真的不需要专门研究 int,我真正需要的是为 AnotherType 执行不同的函数。而且我无法更改 AnotherType 或基本函数的定义。
由于 SFINAE,重载也无济于事。