C++ Coding Standard Specification - CERN
C++ Coding Standard Specification - CERN
C++ Coding Standard Specification - CERN
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>C++</strong> <strong>Coding</strong> <strong>Standard</strong><br />
<strong>Specification</strong><br />
3 <strong>Coding</strong> Version/Issue: 1.1/5<br />
will assign c to b and then b to a as is the case with built in objects.<br />
Source<br />
Status<br />
CXX-40, R84, 15.RC, 4.GC<br />
Common<br />
3.5.3 const Correctness<br />
CI6<br />
Declare a pointer or reference argument, passed to a function, as const if the function does not<br />
change the object bound to it.<br />
An advantage of const-declared parameters is that the compiler will actually give you an<br />
error if you modify such a parameter by mistake, thus helping you to avoid bugs in the<br />
implementation.<br />
Example:<br />
// operator