by evincarofautumn · 11y ago · 0 comments
T *const x = ...; // Immutable pointer to mutable T.
But not this: T const *x = ...; // Mutable pointer to immutable T.
Even so, I don’t agree with the author’s argument that “const” is to be avoided. It does offer some protection against minor errors, which is not nothing.