首页 > 编程语言 > 详细

C++ Rule of Three

时间:2016-01-31 17:13:43      阅读:160      评论:0      收藏:0      [点我收藏+]

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] 

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

C++ Rule of Three

原文:http://www.cnblogs.com/luweimy/p/5173510.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!