🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #424

const reference, not reference to const

#424
From: Daniel Edelson
Date: Sat, 25 Aug 1990 20:58
16 lines
1226 bytes
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         |                              
Technical Details
Message-ID: <6345@darkstar.ucsc.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!decwrl!ucbvax!agate!darkstar!cis.ucsc.edu!daniel

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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