https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101677

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jason Merrill
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:556d061e62ea863c7f99129219ca69bf0792c7f1

commit r11-9828-g556d061e62ea863c7f99129219ca69bf0792c7f1
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.c (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.
  • [Bug c++/101677] [11 Regression... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to