Try to compile:
[code]
#include <future>
int foo(int a, int b)
{
return a + b;
}
int main()
{
auto value = std::async(foo, 5, 6);
}
[/code]
1>ClCompile:
1> main.cpp
1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xrefwrap(96): error C2064: term does not evaluate to a function taking 1 arguments
1> c:\program files (x86)\microsoft visual studio 11.0\vc\include\xrefwrap(121) : see reference to class template instantiation 'std::_Result_type<__formal,_Fty,<unnamed-symbol>>' being compiled
1> with
1> [
1> __formal=false,
1> _Fty=int,
1> <unnamed-symbol>=int &
1> ]
1> c:\program files (x86)\microsoft visual studio 11.0\vc\include\xrefwrap(107) : see reference to class template instantiation 'std::_Result_ofx<_Fty,_V0_t,_V1_t,_V2_t,_V3_t,_V4_t,_V5_t>' being compiled
1> with
1> [
1> _Fty=int,
1> _V0_t=int &,
1> _V1_t=std::_Nil,
1> _V2_t=std::_Nil,
1> _V3_t=std::_Nil,
1> _V4_t=std::_Nil,
1> _V5_t=std::_Nil
1> ]
1> c:\program files (x86)\microsoft visual studio 11.0\vc\include\xrefwrap(243) : see reference to class template instantiation 'std::_Result_of<_Fty,_V0_t,_V1_t,_V2_t,_V3_t,_V4_t,_V5_t,<unnamed-symbol>,_Obj>' being compiled
1> with
1> [
1> _Fty=int,
1> _V0_t=int &,
1> _V1_t=std::_Nil,
1> _V2_t=std::_Nil,
1> _V3_t=std::_Nil,
1> _V4_t=std::_Nil,
1> _V5_t=std::_Nil,
1> <unnamed-symbol>=std::_Nil,
1> _Obj=std::_Nil
1> ]
1> c:\program files (x86)\microsoft visual studio 11.0\vc\include\xrefwrap(250) : see reference to class template instantiation 'std::_Result_of0<_Fty>' being compiled
1> with
1> [
1> _Fty=int (int)
1> ]
1> z:\projects\_dummy\dummy3\main.cpp(10) : see reference to class template instantiation 'std::result_of<_Fty>' being compiled
1> with
1> [
1> _Fty=int (int)
1> ]
1>
1>Build FAILED.