While trying to do the compile example from:
using Visual studio 2012
[]() noexcept { throw 5; }();
I have got the following error:
expected a '{' introducing a lambda body
While trying to do the compile example from:
using Visual studio 2012
[]() noexcept { throw 5; }();
I have got the following error:
expected a '{' introducing a lambda body
The noexcept
has been introduced in c++11, but the MSVS2015 onwards only(unfortunately) one can use this feature. Meaning, you need to upgrade to MSVS2015 and set the compiler flag C++11 or C++14 to compile this code.