effective C++ 学习(Miscellany)
来源:互联网 发布:圆梦会计软件联系方式 编辑:程序博客网 时间:2024/06/05 09:02
Miscellany
Item 53: Pay attention to compiler warnings.
1. Sometimes warnings can exposeyour faults.
class B
{
public:
virtual void f() const;
};
class D: public B
{
public:
virtual void f();
};
Warning:D::f() hides virtual B::f()
Note: const is also the part of functionsign, so the f() in derived class D don’t redeclare f() in base class B.
Item 54: Familiarize yourself with the standard library,including TR1.
1. The tr1::weak_ptrs can solvethe problem of cycle of the tr1::shared_ptr;
2. The tr1::function is discussedin item 35;
The tr1::bind can make it achievedthat when a function is called, the bound objects is also called, which canreplace the pointer “this” in the member function.
3. Hash tables are used to achievesets, multisets, maps and multi-maps;
4. Regular expressions(正则表达式);
5. Tuples (变量组),tr1::tuple can contain any numberof objects;
6. The tr1::array is an array withthe style of STL, but its size is constant;
7. The tr1::mem_fn is used toconstruct member function pointers;
8. The tr1::reference_wrappermakes containers like contain references;
9. Random number;
10. Special math function, including Laguerre polynomial、Bessel functions、completeelliptic integrals;
11. C99 Compatible extensions;
12. Type traits, it provides types information during compiling,including judging whether the T is built-in types or not, whether to providevirtual functions, whether it is an empty class, whether it can be convertedinto other types;
13. The tr1::result_of return the “return type” of function;
Item 55: Familiarize yourself with Boost.
1. String and text processing;
2. Containers;
3. Function objects and seniorprogramming;
4. Generic programming;
5. Template metaprogramming, whichcan provide compile-time entities, like types list.
6. Math and numerics;
7. Correctness and testing;
8. Data structure; type-safeunions and tuple;
9. Inter-language support, allow seamlessinteroperability of C++ and python;
10. Memory; Pool and smartpointers.
11. CRC detection, date and timeprocessing, removing in file system;
- effective C++ 学习(Miscellany)
- Effective C++ 读书笔记之Part9.Miscellany
- 《Effective C++》学习笔记(1)
- 《Effective C++》学习笔记(一)
- 《Effective C++》学习笔记(二)
- 《Effective C++》学习笔记(三)
- 《Effective C++》学习笔记(四)
- 《Effective C++》学习笔记(五)
- 《Effective C++》学习笔记(六)
- 《Effective C++》学习笔记(七)
- 《Effective C++》学习笔记(八)
- const学习后记(effective C++)
- Effective Objective-C 学习笔记(一)
- Effective Object-C 2.0 学习(一)
- 《effective c++》学习笔记(一)
- 《effective c++》学习笔记(二)
- 《effective c++》学习笔记(三)
- 《effective c++》学习笔记(四)
- Recyclerview item上下间距过大
- 输出乘法口诀表
- 协议栈和网卡读书笔记
- 九九乘法表2:
- vnc远程连接树莓派
- effective C++ 学习(Miscellany)
- AsyncTask学习笔记
- java 并发工具包 BlockingQueue-LinkedBlockingQueue
- Source Insight4.0破解,完美支持中文
- retrofit2.0源码分析
- HDU2825-Wireless Password
- RIOT硬件平台调研
- 每天5分钟docker容器技术
- 函数指针