https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104437
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- It's https://wg21.link/cwg2237 and was implemented in r11-532: c++: C++20 DR 2237, disallow simple-template-id in cdtor. This patch implements DR 2237 which says that a simple-template-id is no longer valid as the declarator-id of a constructor or destructor; see [diff.cpp17.class]#2. It is not explicitly stated but out-of-line destructors with a simple-template-id are also meant to be ill-formed now. (Out-of-line constructors like that are invalid since DR1435 I think.) This change only applies to C++20; it is not a DR against C++17. I'm not crazy about the diagnostic in constructors but ISTM that cp_parser_constructor_declarator_p shouldn't print errors. We already have PR 97202 about to poor diagnostic. *** This bug has been marked as a duplicate of bug 97202 ***