Debian Codegraph @

gcc/testsuite/g++.dg/template/fnspec1.C

raw
1 // PR c++/35146
2
3 template <typename T> struct S {};
4
5 template <typename R> struct ref;
6 template <> struct ref<double> { typedef double result; };
7
8 template <typename T>
9 void foo(typename ref<T>::result, S<T>*);
10 template <>
11 void foo(S<double>, S<double>*); // { dg-error "does not match" }
12 template <>
13 void foo(double alpha, S<double>* x)
14 {
15 alpha; x;
16 }