Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-10-14 09:48:21


At 07:58 AM 10/14/2002, Yitzhak Sapir wrote:

>Furthermore, using the same logic, it is possible to claim, based on
>24.4.1.3.3 (operator* definition for a reverse iterator), which states
(in
>the document I'm looking at):
> Effects: Iterator tmp = current;
> return *--tmp;

That text was replaced by DR 198. The new text follows:

   Effects:

     this->tmp = current;
     --this->tmp;
     return *this->tmp;

    [Note: This operation must use an auxiliary member variable, rather
    than a temporary variable, to avoid returning a reference that
    persists beyond the lifetime of its associated iterator. (See 24.1
    [lib.iterator.requirements].) The name of this member variable is
    shown for exposition only. --end note]

Note that I'm not commenting on the discussion, which I haven't been
following closely. Just pointing out that quoted text has changed.

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk