是吗
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