function-template-specialization.cpp [plain text]
template<int N> void f0(int (&array)[N]);
template<> void f0(int (&array)[1]);
void test_f0() {
int iarr1[1];
f0(iarr1);
}
template<> void f0(char (&array)[1]); template<> void f0<2>(int (&array)[2]) { }
template<typename T, int N> void f1(T (&array)[N]); template<int N> void f1(int (&array)[N]);
template<> void f1(float (&array)[1]);
template<> void f1(int (&array)[1]);
template<typename T> void f1(T (&array)[17]); template<> void f1(int (&array)[17]);
template<int N> void f2(double (&array)[N]);
template<typename T> void f2(T (&array)[42]);
template<> void f2<double>(double (&array)[42]);
template<> void f2<42>(double (&array)[42]);
void f2<25>(double (&array)[25]);
namespace PR5833 {
template <typename T> bool f0(T &t1);
template <> bool f0<float>(float &t1);
}
template <> bool PR5833::f0<float>(float &t1) {}
namespace PR8295 {
template <typename T> void f(T t) {}
template <typename T> void f<T*>(T* t) {} }