public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/88580] Parameter pack expansion fails (variadic constructor template inside a variadic class template)
Date: Tue, 27 Apr 2021 18:22:32 +0000	[thread overview]
Message-ID: <bug-88580-4-DTC0z35Wy5@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-88580-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:37d2b98100cefcb9d312d379473c12aa6d61fc62

commit r12-174-g37d2b98100cefcb9d312d379473c12aa6d61fc62
Author: Patrick Palka <ppalka@redhat.com>
Date:   Tue Apr 27 14:18:25 2021 -0400

    c++: Fix Bases(args...)... base initialization [PR88580]

    When substituting into the arguments of a base initializer pack
    expansion, tsubst_initializer_list uses a dummy EXPR_PACK_EXPANSION
    in order to expand an initializer such as Bases(args)... into
    Bases#{0}(args#{0}) and so on.  But when an argument inside the base
    initializer is itself a pack expansion, as in Bases(args...)..., the
    argument is already an EXPR_PACK_EXPANSION so we don't need to wrap it.
    It's also independent from the outer expansion of Bases, so we need to
    "multiplicatively" append the expansion of args... onto the argument
    list of each expanded base.

    gcc/cp/ChangeLog:

            PR c++/88580
            * pt.c (tsubst_initializer_list): Correctly handle the case
            where an argument inside a base initializer pack expansion is
            itself a pack expansion.

    gcc/testsuite/ChangeLog:

            PR c++/88580
            * g++.dg/cpp0x/variadic182.C: New test.

  parent reply	other threads:[~2021-04-27 18:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-88580-4@http.gcc.gnu.org/bugzilla/>
2021-04-24 11:16 ` rustamabd at gmail dot com
2021-04-26 15:30 ` ppalka at gcc dot gnu.org
2021-04-27 18:22 ` cvs-commit at gcc dot gnu.org [this message]
2021-04-27 18:25 ` ppalka at gcc dot gnu.org
2021-12-08 18:58 ` pinskia at gcc dot gnu.org
2022-04-30 16:01 ` ppalka at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-88580-4-DTC0z35Wy5@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).