1 // { dg-do compile { target c++14 } }
3 template <class T> T t1 = 42;
4 template <class T> T* t1<T> = nullptr; // { dg-error "partial" }
6 template <class T> T t2 = 42;
7 template <class T> T* t2<T*> = nullptr;
8 template <class T> T* t2<T*> = nullptr; // { dg-error "redefinition" }
10 template <class T, class U> T t3 = U();
11 template <class T> T t3<T,int> = 42;
12 template <class U> int t3<int,U> = U();
14 int i = t3<int,int>; // { dg-error "ambiguous" }
16 template <class T> T t4 = T();
18 template <class T> T* t4<T*> = nullptr; // { dg-error "after instantiation" }