Name | Checked | Synopsis |
---|
INT#001
|
 |
Non-copy-constructors that can be called with one argument shall be declared as explicit |
INT#002
|
 |
Declare non-constant data members private |
INT#003
|
|
Only declare public or protected accessors for data members that must be accessible |
INT#004
|
 |
Always specify the return type of a method/function explicitly |
INT#005
|
|
Do not change the formal parameters order, just to be able to have parameter defaults |
INT#006
|
 |
A member function that should not change the state of the object shall be declared const |
INT#007
|
|
If the behavior of an object is dependent on data outside the object, this data is not to be modified by const methods |
INT#008
|
 |
Use constant references (const &) instead of call-by-value, unless using a basic data type, a simple object or a pointer |
INT#009
|
|
Do not use special values for don't care parameters |
INT#010
|
|
Use operator overloading sparingly and in a uniform manner |
INT#011
|
 |
If you overload one of a closely related set of operators, then you should overload the whole set and preserve the same invariants that exist for built-in types |
INT#012
|
 |
Avoid multiple definition of overloaded methods/functions in conjunction with the instantiation of a class template |
INT#013
|
 |
Avoid methods and functions with many arguments |
INT#014
|
|
Use a parameter of pointer type if the function stores the address or passes it to a function that does |
INT#015
|
|
All variants of an overloaded member function shall be used for the same purpose and have similar behavior |
INT#016
|
 |
Make simple functions inline |
INT#017
|
 |
Do not use conversion member functions or user-defined cast operators |
INT#018
|
 |
Pass arguments of built-in types by value unless the function should modify them |
INT#019
|
 |
Once a default parameter value is defined, the value may never be changed |
INT#020
|
 |
Pass arguments of non-simple types by reference or pointer |
INT#021
|
 |
Pass arguments of class types by reference or pointer if the class is meant as a public base class |
INT#022
|
 |
A pointer or reference parameter should be declared const if the function does not change the object bound to it |
INT#023
|
 |
The copy constructor and the copy assignment operator shall always have a const parameter |
INT#024
|
|
A member function that gives non-const access to the representation of an object must not be declared const |
INT#025
|
|
Do not let const member functions change the state of the program |
INT#026
|
 |
In a derived class, if you need to override one of a set of the base class's overloaded virtual member functions, then you must override the whole set, or use using-declarations to bring all of the functions in the base class into the scope of the derived class |
INT#027
|
 |
If you override one of the base class's virtual functions, then you shall use the "override" or "final" keyword |
INT#028
|
 |
Supply default arguments with the function's declaration, not with the function's definition |
INT#029
|
|
Use built-in boolean type where possible |
INT#030
|
 |
Do not misuse a pointer when an array is requested |