1 // DR 2237 - Can a template-id name a constructor?
5 X<T>(); // { dg-error "template-id not allowed for constructor" "" { target c++20 } }
6 X(int); // OK, injected-class-name used
7 ~X<T>(); // { dg-error "template-id not allowed for destructor" "" { target c++20 } }
10 // ill-formed since DR1435
11 template<typename T> X<T>::X<T>() {} // { dg-error "names the constructor|as no template constructors" }
12 template<typename T> X<T>::~X<T>() {} // { dg-error "template-id not allowed for destructor" "" { target c++20 } }
15 // ill-formed since DR1435
16 template<typename T> friend X<T>::X<T>(); // { dg-error "names the constructor|as no template constructors" }
17 template<typename T> friend X<T>::~X<T>(); // { dg-error "template-id not allowed for destructor" "" { target c++20 } }