Re: [boost] Re: String Algo bug.
by John Maddock other posts by this author
Jul 20 2004 10:04AM messages near this date
[boost] Re: Regression results for Intel 8 online
|
[boost] Re: String Algo bug.
> 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.
}
Sorry!
John.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
|