The following code:struct Foo{ template <typename T> Foo(T&&) { }}; void Bar(){} int main(){ Foo f = Bar; return 0;}Results in the following error message:error C2440: 'initializing' : cannot convert from 'boost::optional<T> (__cdecl *)(void)' to 'Foo' with [ T=int ] No constructor could take the source type, or constructor overload resolution was ambiguousIt compiles successfully under newer versions of gcc. VC++2010 doesn't seem to think a function pointer can be a parameter to a function accepting a templated rvalue reference parameter, but this is necessary to implement perfect forwarding.
Visual Studio/Team Foundation Server/.NET Framework Tooling version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results