Cpp Coding Standards/Class Construction, Destruction and Copying

From Apache OpenOffice Wiki
< Cpp Coding Standards
Revision as of 10:52, 27 November 2006 by Np (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Special issues of constructors, copying and destructors.

NoVirtualsInCtorDtor

Don't call your own class' virtual functions in a constructor or destructor.

CtorInitSection

Use the constructors initialization section to initialize your members.

ObviousCopyability

Make it obvious if the class is intended to be copied. Forbid copying otherwise.

CopyAndAssignConsistently

Declare copy and assignment operators consistently – either both, or none.


Personal tools