struct Foo;template< typename T>class Bar{}template<>class Bar< Foo >{ int returnsomething() { return 1; }}template< typename T>auto getsomething() -> decltype( Bar< T >::returnsomething ) { Bar< T > t; return t.returnsomething();}main(){ cout << getsomething< Foo >() << endl;}
MSVC gives me an error C2893: Failed to specialize function template ''unknown-type'
I have read the help but not sure what it mean to my code.
Can someone enlighten me? Thanks