Cpp Coding Standards/CLSINIT

From Apache OpenOffice Wiki
Jump to: navigation, search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Class Construction, Destruction and Copying (CLSINIT)

Special issues of constructors, copying and destructors.

No Virtual Calls in Constructor or Destructor (NoVirt)

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

Constructor Initialization Section (InitSect)

Use the constructors initialization section to initialize your members. Details >

Obvious Copyability (ObvCopy)

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

Copy and Assign Consistently (CopyAssign)

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


Related Rules

No Implicit Conversions -> CLSDESIGN:NoConv

Which Functions Never Fail -> ERR:NoFail

Right Destructor -> VIRTUAL:RightDestr

Safe Copying -> VIRTUAL:SafeCopy


Personal tools