一个空的类到底有什么

来源:互联网 发布:英文文本相似度 python 编辑:程序博客网 时间:2024/04/28 12:39

class Empty{};

应该是只有四个的:默认构造函数,析构函数,复制构造函数,赋值运算符.

也即是会默认生成以下东西:

class Empty { public: Empty(); Empty(const Empty&); ~Empty(); Empty& operator=(const Empty& rhs); }; 

Effective C++ 第二版勘误:

http://www.aristeia.com/BookErrata/ec++2e-errata.html

(! 2/10/00 ic 212 A class declaring no operator& function(s) 9/10/01)



原创粉丝点击