Writing decltype expressions involving polymorphic callable entities (template function call operator overload) in VC++11 Beta causes the compile-error:"error C2893: Failed to specialize function template ''unknown-type'..."But the same decltype expressions compiles and works fine in VC++2010 (and GCC 4.6.2). Code which can reproduce the problem:template < typename Fn >struct Foo{ Fn fn; template < typename Tp > auto operator()(const Tp& x) const -> decltype(fn(x)) { return fn(x); }};struct Bar{ template < typename Tp > int operator()(const Tp& x) const { return 0; }};template < typename Fn >void foobar(Fn f){ typedef decltype(f(0)) result_type;}int main(){ foobar(Foo<Bar>()); return 0;}
Visual Studio/Team Foundation Server/.NET Framework Tooling version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results