https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103564
Bug ID: 103564 Summary: type-requirement that names a constructor should fail Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/8dr9oG4Y1. ```C++ template<class T> concept C = requires { typename T::base; }; struct base { }; static_assert(C<base>); ``` Clang rejects with: ``` <source>:6:1: error: static_assert failed static_assert(C<base>); ^ ~~~~~~~ <source>:6:15: note: because 'base' does not satisfy 'C' static_assert(C<base>); ^ <source>:2:26: note: because 'typename T::base' would be invalid: ISO C++ specifies that qualified reference to 'base' is a constructor name rather than a type in this context, despite preceding 'typename' keyword requires { typename T::base; }; ^ 1 error generated. ```