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

--- Comment #7 from GCC 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:ce81cd2eac686dc0f1c91ada0000c779add550b0

commit r15-6453-gce81cd2eac686dc0f1c91ada0000c779add550b0
Author: Nathaniel Shead <nathanielosh...@gmail.com>
Date:   Sun Dec 22 01:18:16 2024 +1100

    c++: Don't treat lambda typedef as lambda declaration [PR106221]

    I noticed that in a couple of places we sometimes treat any TYPE_DECL of
    lambda type as defining a lambda, which isn't always true since C++20:
    in `using T = decltype([]{})`, T is not a lambda-declaration.

            PR c++/106221
            PR c++/110680

    gcc/cp/ChangeLog:

            * pt.cc (check_default_tmpl_args): Check this is actually a
            lambda declaration and not just a typedef.
            (push_template_decl): Likewise.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/lambda-uneval19.C: New test.

    Signed-off-by: Nathaniel Shead <nathanielosh...@gmail.com>
  • [Bug c++/106221] lamba inside a... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to