Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-10-13 11:39:49

Daniel Frey <daniel.frey_at_[hidden]> writes:

> Ask yourself: What is a "value"? To me, it is something that I can read.
> It's different from an "object", which is something you can change. You
> expect the function to return a value? Good, as this means a 'const
> iterator&' would be sufficient.

A const& is not a transparent replacement for a value in other
ways. Consider:

   const iterator& x = c.end();
   c.insert(start, finish);
   // is x valid here, or dangling?

           David Abrahams * Boost Consulting
dave_at_[hidden] *

Boost list run by bdawes at, gregod at, cpdaniel at, john at