decltype and member function (not pointer) type

前端 未结 2 1640
臣服心动
臣服心动 2021-01-15 22:03
struct C
{
    int Foo(int i) { return i; }

    typedef decltype(C::Foo) type;
};

Since there is no such type as a member function type (there isn

2条回答
  •  不知归路
    2021-01-15 22:42

    So what type is decltype(C::Foo)?

    It's no type, since using just C::Foo is ill-formed.

提交回复
热议问题