public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59716] New: variadic template multiple parameter pack expansion fails
@ 2014-01-08  7:15 lts-rudolph at gmx dot de
  2015-04-04  9:27 ` [Bug c++/59716] " paolo.carlini at oracle dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: lts-rudolph at gmx dot de @ 2014-01-08  7:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59716

            Bug ID: 59716
           Summary: variadic template multiple parameter pack expansion
                    fails
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lts-rudolph at gmx dot de

Created attachment 31770
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31770&action=edit
full source code example

Multiple parameter pack expansion for variadic templates is broken since 4.8.x
versions. The parameter pack expansion itself works with g++ 4.7.x. But the
order of expanded parms was wrong. This bug was fixed in 4.8.x but mutiple
expansion is now broken.

The code fails with the follwing results:

/opt/linux-gnu_4.9-20140105/bin/g++ --std=c++11 zwei.cpp -O0 -g -pedantic -Wall
-o go2
zwei.cpp: In instantiation of 'CheckVariadic<std::tuple<_Elements ...>,
std::tuple<_Elements ...> >::CheckVariadic(T1 ..., T2 ..., T1 ...) [with T1 =
{int, float}; T2 = {char, void*}]':
zwei.cpp:53:115:   required from here
zwei.cpp:47:116: error: mismatched argument pack lengths while expanding
'DebugPrinter<T1, T2, T1 ...>'
         CheckVariadic( T1... args1, T2... args2, T1... args3): DebugPrinter<
T1, T2, T1...>(args1, args2..., args1)... {}

The problem occurs in this line of code:
CheckVariadic( T1... args1, T2... args2, T1... args3): DebugPrinter< T1, T2,
T1...>(args1, args2..., args1)... {}

The attachment compiles with clang3.3 & clang3.4 as expected.


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-04-30 16:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-08  7:15 [Bug c++/59716] New: variadic template multiple parameter pack expansion fails lts-rudolph at gmx dot de
2015-04-04  9:27 ` [Bug c++/59716] " paolo.carlini at oracle dot com
2015-08-03 11:02 ` lts-rudolph at gmx dot de
2021-08-10  2:27 ` pinskia at gcc dot gnu.org
2021-08-10  2:56 ` pinskia at gcc dot gnu.org
2021-11-26 19:51 ` lts-rudolph at gmx dot de
2021-11-26 21:14 ` [Bug c++/59716] [10/11 Regression] " pinskia at gcc dot gnu.org
2021-12-09  9:24 ` marxin at gcc dot gnu.org
2021-12-09 14:38 ` pinskia at gcc dot gnu.org
2021-12-09 14:58 ` marxin at gcc dot gnu.org
2022-04-07  8:39 ` rguenth at gcc dot gnu.org
2022-04-07  9:29 ` rguenth at gcc dot gnu.org
2022-04-07 13:28 ` ppalka at gcc dot gnu.org
2022-04-30 16:01 ` [Bug c++/59716] " ppalka at gcc dot gnu.org

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).