Topic: Dereferencing constant iterators


Author: dag.henriksson@quidsoft.se
Date: 2000/01/13
Raw View
24.1p4 says:
"Constant iterators do not satisfy the requirements for output
iterators,
and the result of the expression *i (for constant iterator i) cannot be
used in an expression where an lvalue is required."

Why is that so?
I would have guessed that *i for constant iterator i yields a non-
modifiable lvalue.

-- Dag Henriksson


Sent via Deja.com http://www.deja.com/
Before you buy.


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]