This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/47226] [C++0x] GCC doesn't expand template parameter pack that appears in a lambda-expression


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"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]