Next: 3.3 Inheritance  Up: 3 Class  Previous: 3.1 General  Contents

3.2 Constructors and Destructors

3.2.1

High Integrity CPP Rule

Ensure all constructors supply an initial value (or invoke a constructor) for each virtual base class, each non virtual base class and all non-static data members.

3.2.2

High Integrity CPP Rule

Write members in an initialisation list in the order in which they are declared.

3.2.3

High Integrity CPP Rule

Declare all single argument constructors as explicit thus preventing their use as implicit type convertors.

3.2.4

High Integrity CPP Guideline

An abstract class shall have no public constructors.

3.2.5

High Integrity CPP Rule

Ensure destructors release all resources owned by the object.

3.2.6

High Integrity CPP Guideline

Do not inline constructors or destructors.


HICPP VERSION 2.4  http://www.codingstandard.com   Copyright: © 2007 THE PROGRAMMING RESEARCH GROUP