I have a problem with lambdas in MSVC2010.
It is successful compiled:
auto f1 = []() { };
boost::function<void()> a = f1;
But it brings an error C2440:
auto f2 = []()
{
auto f3 = []() { };
boost::function<void()> b = f3;
};
Error C2440:
'initializing' : cannot convert from 'int' to 'boost::function<Signature>'
with
[
Signature=void (void)
]
No constructor could take the source type, or constructor overload resolution was ambiguous
Why? Does it work in GCC4.6?