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

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nathaniel Shead <nsh...@gcc.gnu.org>:

https://gcc.gnu.org/g:cff1fa6625d1273fcfaf473e436ba918262d8afa

commit r14-5810-gcff1fa6625d1273fcfaf473e436ba918262d8afa
Author: Nathaniel Shead <nathanielosh...@gmail.com>
Date:   Mon Nov 13 20:11:15 2023 +1100

    c++: Support lambdas in static template member initialisers [PR107398]

    The testcase noted in the PR fails because the context of the lambda is
    not in namespace scope, but rather in class scope. This patch removes
    the assertion that the context must be a namespace and ensures that
    lambdas in class scope still get the correct merge_kind.

            PR c++/107398

    gcc/cp/ChangeLog:

            * module.cc (trees_out::get_merge_kind): Handle lambdas in class
            scope.
            (maybe_key_decl): Remove assertion and fix whitespace.

    gcc/testsuite/ChangeLog:

            * g++.dg/modules/lambda-6_a.C: New test.
            * g++.dg/modules/lambda-6_b.C: New test.

    Signed-off-by: Nathaniel Shead <nathanielosh...@gmail.com>

Reply via email to