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

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

https://gcc.gnu.org/g:5e7801808d2e9e99dc2931462c69a80c6f0e89cc

commit r10-9840-g5e7801808d2e9e99dc2931462c69a80c6f0e89cc
Author: Jason Merrill <ja...@redhat.com>
Date:   Fri Apr 2 11:05:46 2021 -0400

    c++: lambda pack init-capture within generic lambda

    We represent the type of a pack init-capture as auto... with packs from the
    initializer stuck into PACK_EXPANSION_PARAMETER_PACKS so that expanding it
    produces the right number of elements.  But when partially instantiating
the
    auto..., we were changing PACK_EXPANSION_PARAMETER_PACKS to refer to only
    the auto itself.  Fixed thus.

    gcc/cp/ChangeLog:

            PR c++/97938
            * cp-tree.h (PACK_EXPANSION_AUTO_P): New.
            * lambda.c (add_capture): Set it.
            * pt.c (tsubst_pack_expansion): Handle it.

    gcc/testsuite/ChangeLog:

            PR c++/97938
            * g++.dg/cpp2a/lambda-pack-init6.C: New test.

Reply via email to