[Effective C++] 条款03:尽可能使用const
2009-07-04 22:13
288 查看
1.将某些东西声明为const可帮助编译器侦测出错误用法.const可被施加于任何作用域的对象,函数参数,函数返回类型,成员函数本体.
2.编译器强制实施bitwise constness,但你编写程序时应该使用"概念上的常量性"(conceptual constness);
3.当const和non-const成员函数有着实质等价的实现时,令non-const版本调用const版本可避免代码重复.
2.编译器强制实施bitwise constness,但你编写程序时应该使用"概念上的常量性"(conceptual constness);
3.当const和non-const成员函数有着实质等价的实现时,令non-const版本调用const版本可避免代码重复.
相关文章推荐
- [Effective C++]条款03:尽可能使用const
- Effective C++:条款03:尽可能使用const
- Effective C++--条款03:尽可能使用const
- Effective C++ -----条款03:尽可能使用const
- 读书笔记《Effective c++》 条款03 尽可能使用const
- effective c++ 条款03 尽可能的使用const (const 的魅力)
- Effective C++ 条款03:尽可能使用const
- Effective C++_笔记_条款03_尽可能使用const
- 《Effective C++》学习笔记条款03 尽可能使用const
- Effective C++学习笔记——条款03:尽可能使用const
- Effective C++学习笔记——条款03:尽可能使用const
- Effective C++学习3 条款03:尽可能使用const
- 【Effective C++】条款03-尽可能使用const
- 条款03:尽可能使用const
- 条款03:尽可能使用const
- 条款03:尽可能的使用const
- 条款03:尽可能使用const
- Effective C++条款03解读:尽可能使用const
- 条款03:尽可能使用const
- 条款03:尽可能使用const(Use const whenever possible.)