Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git] / main / gcc / testsuite / g++.dg / cpp1y / auto-fn10.C
blob890cfda1205a6aa71f0e56f9ada8acc8fe9ad4d6
1 // A template declared with auto should be declared with auto in an
2 // explicit instantiation or explicit specialization, too.
3 // { dg-do compile { target c++1y } }
5 template <class T>
6 auto f(T t) { return t; }
8 template<> auto f<int>(int);
9 template auto f<float>(float);
10 template<> auto f(int*);
11 template auto f(float*);
13 template<> short f<short>(short); // { dg-error "does not match" }
14 template char f<char>(char);      // { dg-error "does not match" }
15 template<> short f(short*);       // { dg-error "does not match" }
16 template char f(char*);           // { dg-error "does not match" }