【发布时间】:2018-11-12 22:43:43
【问题描述】:
struct MyStruct {
typedef int MyStruct::*Ptr; // my pointer-to-member type
int foo, bar;
};
此代码有效,但我想以现代风格更新它,并将typedef 替换为using。使用什么正确的语法?我尝试了很多选择,但我被卡住了;我能找到的唯一示例是指向成员的指针函数,这是不同的。
【问题讨论】:
标签: c++ pointer-to-member