HP Code Advisor Diagnostics

};
Action:
Make the member function either static or virtual, for example: virtual void vfoo() {}
Reference:
2315 the object has cv-qualifiers that are not compatible with the member
function
Cause:
The cv qualifiers ( const and volatile qualifiers) of the object should be compatible with the cv
qualifiers of member functions that it calls. For example, any attempt to call a non-const member
function on a const object will result in an error.
Example:
int main() {
struct X {
void foo();
};
const X s;
s.foo();
}
Action:
Ensure that the cv qualifiers of the object are not stricter than cv qualifiers of the methods that
called through it.
Reference:
ANSI/ISO C++ 9.3.2(4)
2319 pure specifier ("= 0") allowed only on virtual functions
Cause:
Only virtual functions can be declared as pure; other functions cannot have pure specifier as it
is meaningless.
Example:
class base {
public:
static int foo() = 0;
};
Action:
Provide the pure specifier only for virtual functions.
Reference:
ANSI/ISO C++ 9.3.1(4)
2320 badly-formed pure specifier (only "= 0" is allowed)
Cause:
Pure virtual functions are declared by a pure specifier indicated by = 0 ; = 0 does not indicate
initialization or assignment, hence 0 cannot be replaced by other values.
Example:
class base {
public:
2315 the object has cv-qualifiers that are not compatible with the member function 43