This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47226] [C++0x] GCC doesn't expand template parameter pack that appears in a lambda-expression
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 26 Jun 2012 20:25:16 +0000
- Subject: [Bug c++/47226] [C++0x] GCC doesn't expand template parameter pack that appears in a lambda-expression
- Auto-submitted: auto-generated
- References: <bug-47226-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47226
Daniel KrÃgler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler at
| |googlemail dot com
--- Comment #2 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> 2012-06-26 20:25:16 UTC ---
The problem still exists in gcc 4.8.0 20120610 (experimental) compiled with
-Wall -pedantic -std=c++11. Here a variation of Johannes example based on a
similar Clang bug report from Doug Gregor:
//----
template<class T>
void print(const T&) {}
template<class... T>
void accept_all(T&&...){}
template<class... T>
void print_all(const T&... t)
{
accept_all([&]()->int { print(t); return 0; }...); // Line 10
}
int main()
{
print_all(1, true, 'a');
}
//----
"10|error: parameter packs not expanded with '...':|
10|note: 't'|
|In function 'void print_all(const T& ...)':|
10|error: expansion pattern '#'lambda_expr' not supported by
dump_expr#<expression error>' contains no argument packs"