Skip to main content
Commonmark migration
Source Link

I am personally fan of the High Integrity C++ standard.

The rules are extremely objective, there is no naming convention for example.

3 Class

 

3.1 General

 

High Integrity CPP Rule 3.1.1 Organise 'class' definitions by access level, in the following order: public, protected, private. (QACPP 2108, 2109, 2191, 2192, 2195)

 

Justification Order by decreasing scope of audience. Client program designers need to know public members; designers of potential subclasses need to know about protected members; and only implementors of the class need to know about private members and friends.

class C // correct access order { public: // ... protected: // ... private: // ... }; 

Reference Industrial Strength C++ A.12, A.13;

I am personally fan of the High Integrity C++ standard.

The rules are extremely objective, there is no naming convention for example.

3 Class

 

3.1 General

 

High Integrity CPP Rule 3.1.1 Organise 'class' definitions by access level, in the following order: public, protected, private. (QACPP 2108, 2109, 2191, 2192, 2195)

 

Justification Order by decreasing scope of audience. Client program designers need to know public members; designers of potential subclasses need to know about protected members; and only implementors of the class need to know about private members and friends.

class C // correct access order { public: // ... protected: // ... private: // ... }; 

Reference Industrial Strength C++ A.12, A.13;

I am personally fan of the High Integrity C++ standard.

The rules are extremely objective, there is no naming convention for example.

3 Class

3.1 General

High Integrity CPP Rule 3.1.1 Organise 'class' definitions by access level, in the following order: public, protected, private. (QACPP 2108, 2109, 2191, 2192, 2195)

Justification Order by decreasing scope of audience. Client program designers need to know public members; designers of potential subclasses need to know about protected members; and only implementors of the class need to know about private members and friends.

class C // correct access order { public: // ... protected: // ... private: // ... }; 

Reference Industrial Strength C++ A.12, A.13;

Source Link
Matthieu M.
  • 15.3k
  • 5
  • 48
  • 69

I am personally fan of the High Integrity C++ standard.

The rules are extremely objective, there is no naming convention for example.

3 Class

3.1 General

High Integrity CPP Rule 3.1.1 Organise 'class' definitions by access level, in the following order: public, protected, private. (QACPP 2108, 2109, 2191, 2192, 2195)

Justification Order by decreasing scope of audience. Client program designers need to know public members; designers of potential subclasses need to know about protected members; and only implementors of the class need to know about private members and friends.

class C // correct access order { public: // ... protected: // ... private: // ... }; 

Reference Industrial Strength C++ A.12, A.13;