[Bug c++/101677] [11/12 Regression] Concept with use of incomplete type succeeds on GCC 10.3.0, fails on GCC 11 onward
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 5 16:29:33 GMT 2022
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 <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:1de6612d994ada8edaab18bbc6afd8e9a57413aa
commit r12-7997-g1de6612d994ada8edaab18bbc6afd8e9a57413aa
Author: Jason Merrill <jason@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.
More information about the Gcc-bugs
mailing list