Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2004-07-20 05:04:22

> I didn't find out yet what it is (it takes some time to get STLPort
> running...), but it works for c strings and crashes for std::string (see
> the first two calls of the library in the split testcase). These and
> other lines were changed a few days ago to fix a bug that we found on
> default constructed iterators for c strings. Now it seems there are also
> troubles with std::strings...

Let me try and be clearer:

A singular iterator (that is to say one that is default constructed) has
only one behaviour defined for it - you can assign to it a new value - and
that's all you can do with it. You cannot compare a singular iterator with
another iterator (not even another singular one), *unless* the particular
iterator type has some implementation-defined behaviour specified for that
particular type.

For example the following is not legal code:

template <class Iterator>
foo(Iterator t)
Iterator a, b;
a == b; // illegal operation.
a == t; // also illegal.



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