Community
cancel
Showing results for 
Search instead for 
Did you mean: 
90 Views

C++0x copying lambdas causes backend signal

<class T>
function<
void ()> test() { return [] () {}; }

int main(int argc, _TCHAR* argv[])
{
test<
int>();
}

0 Kudos
1 Reply
Judith_W_Intel
Employee
90 Views

The test case you wrote above is illegal since you the function class was never declared.

Inboth 11.1 and 12.0on Windows I see this validerror:

!% icl /Qstd=c++0x -c t.cpp
Intel C++ Compiler XE for applications running on IA-32, Version 12.0 Beta Bu
ild x
Built Mar 29 2011 23:08:17 by jward4 on JWARD4-DESK in D:/workspaces/12_0cfe/dev

Copyright (C) 1985-2011 Intel Corporation. All rights reserved.

t.cpp
t.cpp(3): error: expected a declaration

^

t.cpp(11): warning #12: parsing restarts here after previous syntax error

compilation aborted for t.cpp (code 2)

Please provide more details, like what version of the compiler you are using and what the actual code looks like. I know there were some lambda bugs in version 11.1 but I don't know of any in 12.0.

thanks
Judy

Reply