>> So adding a const is more of a compiler issue than
anything else?
Exactly.
A pang of guilt compells me to add that by using const, you are implying
certain guarantees to the clients of your code. It is true that the
only time you *need* const is to make stuff compile, and that the
compiled code is unlikely to be any better for const having been used.
However, const is also a way to document your code's behavior. It's a
lot like adding a comment that says a variable will not be altered
within a certain section of code. Adding comments doesn't make your
code any more efficient, but it might make the programmers who use it
more efficient.
Ok, guilt assuaged. :)
-Jef