https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107126
--- Comment #6 from Jason Liam <jlame646 at gmail dot com> --- This means that the code `template<class T> struct A {~A<T>(); };` is ill-formed only with c++20 and onwards while the code `template<class T> struct A {~A(); }; template<typename T> A<T>::~A<T>(){} ;` is ill-formed in all c++ versions including c++17.