Consider the following piece of code==============#include <functional>int main(){ auto f = [](int i) { return 0.f; }; typedef decltype(f) f_type; std::result_of<f_type(int)>::type v;}==============This fails to compile, and will result in the error:C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult(28): error C2903: 'result' : symbol is neither a class template nor a function templateApparently, a lambda doesn't define a result_type typedef. Now, C++11 doesn't say that it should, but then again, C++11 defines result_of<> using decltype(). Perhaps VC++ should implement result_of similarly? Or, in the mean time, simply add a result_type typedef to the compiler generated function object.
Visual Studio/Team Foundation Server/.NET Framework Tooling version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results
Please wait...