Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Dix_Lorenz
Beginner
101 Views

Initialized Lambda Capture

According to https://software.intel.com/en-us/articles/c14-features-supported-by-intel-c-compiler ICC15 should support initialized lambda captures. Yet code like this

 

 

 

 

*this = make([f, theLocalData = std::move(theLocalData)] {

fails to compile:

error: expected a "]"

1>        *this = make([f, theLocalData = std::move(theLocalData)] {

1>                                      ^

 

clang compiles it, so I assume I am using that feature correctly: I didn't find any compiler option to enable C++14, it is set to use C++11 features though. Bug in the compiler or am I using it wrong?

 

(Sorry for the formatting, but this editor is totally messed up on Safari)

0 Kudos
2 Replies
Judith_W_Intel
Employee
101 Views

 

Could you please provide a complete test case? Also please try the -std=c++14 option.

thanks,

Judy

Dix_Lorenz
Beginner
101 Views

how would I set -std=c++14 in Visual Studio? The property editor only offers to enable C++11 support.

Reply