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

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

https://gcc.gnu.org/g:2a26351b598242c2fbce95d2a0baacce0084aec6

commit r11-7961-g2a26351b598242c2fbce95d2a0baacce0084aec6
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