🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Daniel Edelson Sat, 25 Aug 1990 20:58
const reference, not reference to const
#424
Author: 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         |                              
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads