This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/41934] New: function parameter pack inaccessible inside lambda
- From: "bruck dot michael at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Nov 2009 03:13:50 -0000
- Subject: [Bug c++/41934] New: function parameter pack inaccessible inside lambda
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$ cat test.c
void foo(...);
template <typename... TT>
void bar1(TT... tt)
{
auto my_precious = [=](){ foo(tt...); };
}
template <typename... TT>
void bar2(TT... tt)
{
auto my_precious = [&](){ foo(tt...); };
}
$ arm-elf-g++.exe -std=gnu++0x -c test.c
test.c: In lambda function:
test.c:7:35: error: parameter packs not expanded with '...':
test.c:7:35: note: 'tt'
test.c:7:37: error: expansion pattern '((const bar1(TT
...)::<lambda()>*)this)->bar1(TT ...)::<lambda()>::tt' contains no argument
packs
test.c: In lambda function:
test.c:14:35: error: parameter packs not expanded with '...':
test.c:14:35: note: 'tt'
test.c:14:37: error: expansion pattern '((const bar2(TT
...)::<lambda()>*)this)->bar2(TT ...)::<lambda()>::tt' contains no argument
packs
This is with svn rev 153796.
Bug 41933 could be related to this.
--
Summary: function parameter pack inaccessible inside lambda
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bruck dot michael at googlemail dot com
GCC host triplet: i686-pc-cygwin
GCC target triplet: arm-unknown-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41934