home > resources > c++ coding standard > online version

Appendix A. Todo

  • exceptions <> return values
  • when to return a pointer, a value or a reference from a method
  • indenting of variable declarations
  • unit testing
  • no magic numbers
  • tabs/spaces policy
  • how to break lines
  • don't mix pointers and non-pointers on a single declaration line
  • use 0 instead of NULL
  • #define <> const <> template functions
  • match new ~ delete and new[] ~ delete[], don't use malloc ~ free (initialization, destruction, not overloadable)
  • base classes virtual destructor
  • assignment to self in operator=
  • cont correctness and pointers, uses of mutable
  • postponed variable declaration at beginning of relevant code block
  • public inheritance : isa, layering/composition : hasa is-implemented-in-terms-of, pure virtual function : interface inheritance, simple virtual function : interface inheritance with default implementation (dangerous : sever connection with pure virtual function and explicit default implementation), non virtual function : interface inheritance + mandatory implementation, private inheritance : is-implemented-in-terms-of + implementation inheritance not interface, default parameters and virtual function.
  • say what you mean, mean what you say
  • inheritance (type of objects changes behaviour) <> templates (type of objects doesn't change behaviour of methods)