Debian Codegraph @

gcc/testsuite/g++.dg/DRs/dr2237-2.C

raw
1 // DR 2237 - Can a template-id name a constructor?
2 // { dg-options "" }
3
4 template<class T>
5 struct X {
6 X<T>(); // { dg-warning "template-id not allowed for constructor" "" { target c++20 } }
7 X(int); // OK, injected-class-name used
8 ~X<T>(); // { dg-warning "template-id not allowed for destructor" "" { target c++20 } }
9 };