跳转至

《Effective C++》

1. Accustoming yourself to C++

Rule 01: View C++ as a federation of languages

Rule 02: Prefer const, enum, and inline to #define

Rule 03: Use const wherever possible

Rule 04: Make sure that projects are initialized before they're used

2. Constructions, Destructions, and Assignment Operators

Rule 05: Know what functions C++ silently writes and calls

Rule 06: Explicitly disallow the use of compiler-generated functions you do not want

Rule 07: Declare destructions virtual in polymorphic base classes

Rule 08: Prevent exceptions from leaving destructions

Rule 09: Never call virtual functions during construction or destruction

Rule 10: Have assignment operators return s reference to *this

Rule 11: Handle assignment to self in operator=

Rule 12: Copy all parts of an object