码迷,mamicode.com
首页 > 编程语言 > 详细

C++ Rule of Three

时间:2016-01-31 17:14:37      阅读:183      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!