摘要: 在C++11之前,不支持static const member declaration,即在声明static const对象的同时进行赋值(只适用于内置类型?)。如果需要在class内部定义个数组,但是又需要定义一个数组常量,可以使用enum hack: class foo { private: e 阅读全文
posted @ 2020-07-15 09:06 adfas 阅读(158) 评论(0) 推荐(0) 编辑