[content]
Item 53: Pay attention to compiler warnings
Example: warning: D::f() hides virtual B::f(). D::f is not overloading B::f. Instead, it is hiding B::f. B::f is not re-declared in D class.
class B {
public:
virtual void f() const;
};
class D: public B {
public:
virtual void f();
};
Item 54: Familiarize yourself with the standard library, including TR1
DO: Familiarize yourself with following library
- The Standard Template Library (STL): containers, iterators, algorithms, function objects, adapters
- Iostreams: user-defined buffering, internationalized IO, pre-defined obejcts (cin, cout, cerr, clog)
- Support for internationalization: wchar_t, wstring etc.
- Support for numeric processing: templates for complex numbers, arrays of pure values (valarray)
- An exception hierarchy: base class exception, logic_error, runtime_error, etc.
- Smart pointers: unique_ptr, shared_ptr
- C++11 new standard classes and functions: std::function, std::bind, std::unordered_set, std::tuple, std::array, std::mem_fn, std::reference_wrapper
- Regular expressions
- Random number generation
- Mathematical functions
- Type traits, std::result_of
Item 55: Familiarize yourself with Boost
Boost is an open-source, platform- and compiler- independent library. It contains state-of-the-art library design and implementation. Examples are,
- Conversion library: e.g. nemeric_cast
- Boost Graph Library: for programming with arbitrary graph structures
- Boost MPL Library: meta-programming library
- String, text related: tokenizing, parsing etc.
- Containers related: bitsets, multidimensional arrays etc.
- Function objects and higher-order programming
- Generic programming
- Template programming
- Math and numerics
- Correctness and testing
- Data structures
- Inter-language support: e.g. python and C++
- Memory
- Miscellaneous: e.g. CRC (Cyclic redundancy check) checking