// { dg-do compile } // Contributed by Paul Koning // PR c++/15947: Accept destructor as template in qualified-id template struct X { ~X(); }; template X::~X(){} // { dg-error "template-id not allowed for destructor" "" { target c++20 } }