Debian Codegraph @

gcc/testsuite/g++.dg/warn/Wtemplate-id-cdtor-4.C

raw
1 // PR c++/107126
2 // { dg-do compile }
3 // { dg-options "-Wtemplate-id-cdtor -Wno-c++20-compat" }
4
5 template<class T>
6 struct X {
7 X<T>(); // { dg-warning "template-id not allowed for constructor" }
8 ~X<T>(); // { dg-warning "template-id not allowed for destructor" }
9 };