それは...ですか
template <typename T>
void foo(T) {}
template <>
void foo(int) {}
明示的な特殊化または関数のオーバーロード、および明示的な初期化コンパイラについては、次のコードを見たいですか?
template <typename T>
void foo(T) {}
template <>
void foo<int>(int) {}
私は、標準がこれらの両方を受け入れると思います:
ISO/IEC 14882:2011
14.7.3 Explicit specialization [temp.expl.spec] 1 ... can be declared by a declaration introduced by template<>; that is: explicit-specialization: template < > declaration