Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2007-11-15 09:32:36

David Abrahams ha escrito:

> on Fri Nov 09 2007, "JOAQUIN LOPEZ MU?Z" <> wrote:
> > I'm afraid (last<first) violates the precondition even with
> > random access iterators, according to 24.1.6 and as explicitly
> > acknowledged at
> > .
> I don't see how to read the issue resolution so it says that.

The resolution states that the definition of "reachable" to be taken into account
is the one given in 24.1/6, which depends only on operator ++.

  "An iterator j is called reachable from an iterator i if and only if there is a
  finite sequence of applications of the expression ++i that makes i == j"

Hence if last<first, last is *not* reachable from first; there is no finite
sequence of applications of operator++() to first that gives you last.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

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