https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123919
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2026-02-02
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
EDG and MSVC also only reject this when the template is instantiated, only
Clang rejects it when first parsing the template.
I think it would make sense to diagnose this under -Wtemplate-body like other
"this can never be well-formed" bugs in templates.