Topic: const reference, not reference to const
Author: daniel@cis.ucsc.edu (Daniel Edelson)
Date: 25 Aug 90 20:58:54 GMT Raw View
Earlier I asked if anyone knows of useful non-null semantics
for a const reference. Several people have sent me mail saying
that a const reference makes it impossible to modify the referant.
However these people are confusing a constant reference with a reference
to a const, i.e., I was discussing:
T & const r;
The other:
const T & r;
has distinct though not completely agreed-upon semantics.
I apologize for not enclosing an example in my original posting
that would have prevented this confusion.
Daniel Edelson | ``C++ is not too complex,
daniel@cis.ucsc.edu, or | job security is important.''
..!sun!practic!peren!daniel |