rules of thumb in c++ for building exception-safe code.

if any is defined, then must define:

  • destructor
  • copy constructor
  • copy assignment operator