C++ Rule of Three

Rule of Three

The rule of three (also known as the Law of The Big Three or The Big Three) is a rule of thumb in C++ (prior to C++11) that claims that if a class defines one (or more) of the following it should probably explicitly define all three:[1] 

如果需要析构函数,则一定需要拷贝构造函数和赋值操作符

posted @ 2016-01-31 16:58  luweimy  阅读(501)  评论(0编辑  收藏  举报