Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!decwrl!ucbvax!agate!darkstar!cis.ucsc.edu!daniel From: daniel@cis.ucsc.edu (Daniel Edelson) Newsgroups: comp.std.c++ Subject: const reference, not reference to const Keywords: const reference to const or not Message-ID: <6345@darkstar.ucsc.edu> Date: 25 Aug 90 20:58:54 GMT Sender: usenet@darkstar.ucsc.edu Reply-To: daniel@cis.ucsc.edu (Daniel Edelson) Organization: University of California, Santa Cruz Lines: 16 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 |