??? 02/21/11 12:25 Read: times |
#181207 - const correctness Responding to: ???'s previous message |
The main purpose of a const declaration is to inform/remind the programmer not to change the parameter inside the function. It is a small but significant step in the effort to produce quality code.
The prototype declaration must match the function declaration. The use of const may allow the compiler to make some additional performance optimisations. The programmer is after all providing more information for the compiler to work with. |
Topic | Author | Date |
const function parameter declaration | 01/01/70 00:00 | |
lint can be too noisy if you ask it to | 01/01/70 00:00 | |
const correctness![]() | 01/01/70 00:00 |