[Bug c++/88580] Parameter pack expansion fails (variadic constructor template inside a variadic class template)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88580 Patrick Palka changed: What|Removed |Added See Also|https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=59716 | CC||lts-rudolph at gmx dot de --- Comment #8 from Patrick Palka --- *** Bug 59716 has been marked as a duplicate of this bug. ***
[Bug c++/88580] Parameter pack expansion fails (variadic constructor template inside a variadic class template)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88580 Andrew Pinski changed: What|Removed |Added CC||0x66726565 at gmail dot com --- Comment #7 from Andrew Pinski --- *** Bug 84464 has been marked as a duplicate of this bug. ***
[Bug c++/88580] Parameter pack expansion fails (variadic constructor template inside a variadic class template)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88580 Patrick Palka changed: What|Removed |Added Target Milestone|--- |12.0 Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #6 from Patrick Palka --- Thanks for the bug report. This should now be fixed for GCC 12.
[Bug c++/88580] Parameter pack expansion fails (variadic constructor template inside a variadic class template)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88580 --- Comment #5 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:37d2b98100cefcb9d312d379473c12aa6d61fc62 commit r12-174-g37d2b98100cefcb9d312d379473c12aa6d61fc62 Author: Patrick Palka 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.
[Bug c++/88580] Parameter pack expansion fails (variadic constructor template inside a variadic class template)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88580 Patrick Palka changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2021-04-26 CC||ppalka at gcc dot gnu.org Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
[Bug c++/88580] Parameter pack expansion fails (variadic constructor template inside a variadic class template)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88580 Rustam Abdullaev changed: What|Removed |Added CC||rustamabd at gmail dot com --- Comment #4 from Rustam Abdullaev --- Works if I change : Base(std::forward(args)...)... To : Base{std::forward(args)...}...
[Bug c++/88580] Parameter pack expansion fails (variadic constructor template inside a variadic class template)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88580 --- Comment #3 from Zavadovsky Yan --- (In reply to Petr Filipsky from comment #0) > Sorry if this kind of error has been reported already (I know that there are > already several bugs reported regarding variadic template parameter > expansion but none of them seemed to me identical to this one). I also can't find similar bugs except this one created by you.
[Bug c++/88580] Parameter pack expansion fails (variadic constructor template inside a variadic class template)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88580 --- Comment #2 from Zavadovsky Yan --- Created attachment 47622 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47622=edit test.ii gcc --save-temps output
[Bug c++/88580] Parameter pack expansion fails (variadic constructor template inside a variadic class template)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88580 --- Comment #1 from Zavadovsky Yan --- Got same bug with all GCC version since (at least, doesn't check older versions) 6.3.0 and newer. Code: struct Base { Base(void*) { } virtual ~Base() { } }; template< typename... Ts > struct Derived : public Ts... { template< typename... Us > Derived(Us... args) : Ts(args...)... { } }; int main() { Derived d((void*)0); return 0; } Clang++ compiles it. GCC reports error: test.cpp: In instantiation of ‘Derived::Derived(Us ...) [with Us = {void*}; Ts = {Base}]’: test.cpp:14:26: required from here test.cpp:9:62: error: no matching function for call to ‘Base::Base(bool)’ 9 | template< typename... Us > Derived(Us... args) : Ts(args...)... { } | ^~~ test.cpp:3:2: note: candidate: ‘Base::Base(void*)’ 3 | Base(void*) { } | ^~~~ test.cpp:3:7: note: no known conversion for argument 1 from ‘bool’ to ‘void*’ 3 | Base(void*) { } | ^ test.cpp:1:8: note: candidate: ‘constexpr Base::Base(const Base&)’ 1 | struct Base |^~~~ test.cpp:1:8: note: no known conversion for argument 1 from ‘bool’ to ‘const Base&’ Compilation command: g++ -std=c++14 -c test.cpp GCC version: Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/9/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 9.2.1 20190827 (Red Hat 9.2.1-1) (GCC)