Приветствую.
Вот код:
#include <functional>
int _tmain(int argc, _TCHAR* argv[])
{
enum E { a, b, c };
E e = a;
std::function<void ()> parseArgs = [&] () -> void {
e = b;
};
return 0;
}
не компилируется с ошибкой (MS VS 2010)
1>c:\test_lambda\test_lambda.cpp(14): error C2665: '`anonymous-namespace'::<lambda0>::<lambda0>' : none of the 2 overloads could convert all the argument types
1> c:\test_lambda\test_lambda.cpp(14): could be '`anonymous-namespace'::<lambda0>::(wmain::E &,wmain::E &)'
1> while trying to match the argument list '(wmain::E, wmain::E)'
ЧЯДНТ?