Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
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.

List of 3 messages in thread
TopicAuthorDate
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      

Back to Subject List