TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
C++ Coding Standard

Rule:  INT#022Checked automatically with code checker

Synopsis:A pointer or reference parameter should be declared const if the function does not change the object bound to it
Severity Level:4
Category:Class Interface


Note that what is meant is: the pointee, instead of the pointer, should be declared const if appropriate. See also [INT#020].

void f(const int* ptr);  // okay: pass ptr to a const int
void f(const int& ref);  // okay: pass ref to a const int