https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101677
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:1de6612d994ada8edaab18bbc6afd8e9a57413aa commit r12-7997-g1de6612d994ada8edaab18bbc6afd8e9a57413aa Author: Jason Merrill <ja...@redhat.com> Date: Sun Mar 27 22:31:51 2022 -0400 c++: elaborated-type-spec in requires-expr [PR101677] We were failing to declare class S in the global namespace because we were treating the requires-expression parameter scope as a normal block scope, so the implicit declaration went there. It seems to me that the requires parameter scope is more like a function parameter scope (not least in the use of the word "parameter"), so let's change the scope kind. But then we need to adjust the prohibition on placeholders declaring implicit template parameters. PR c++/101677 gcc/cp/ChangeLog: * name-lookup.h (struct cp_binding_level): Add requires_expression bit-field. * parser.cc (cp_parser_requires_expression): Set it. (synthesize_implicit_template_parm): Check it. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-pr67178.C: Adjust error. * g++.dg/cpp2a/concepts-requires28.C: New test.