2015年9月1日

【more effective c++读书笔记】【第4章】效率(3)

摘要: 条款22:考虑以操作符复合形式(op=)取代其独身形式(op)1、确保操作符的复合形式(如operator+=)和其独身形式 (如 operator+ )之间的自然关系能够存在,一个好方法就是以前者为基础实现后者。例子:#includeusing namespace std;class Ration... 阅读全文

posted @ 2015-09-01 14:17 ruan875417 阅读(161) 评论(0) 推荐(0) 编辑

导航