struct C
{
int Foo(int i) { return i; }
typedef decltype(C::Foo) type;
};
Run Code Online (Sandbox Code Playgroud)
由于没有成员函数类型这样的类型(没有,有吗?),我希望C::type如此int (int).
但以下将无法使用Visual C++ 2012 RC进行编译:
std::function<C::type> f;
Run Code Online (Sandbox Code Playgroud)
那是什么类型的decltype(C::Foo)?