Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-07-20 09:44:13


Stefan Slapeta <stefan_nospam__at_[hidden]> writes:

> David Abrahams wrote:
>
>
>> Nit: there are no exceptions for singular iterators. In the case
>> you're describing, the iterator is simply not singular. There's no
>> rule that says a default-constructed iterator must be singular.
>
> Nice. In your last message you wrote:
>
> >>
> A default constructed standard container iterator is
> "singular"
> <<
>
> So my conclusion is:
> find_iterator as well as directory_iterator are no iterators on
> standard containers and therefore there is no requirement to declare
> them "singular" if they are default constructed. Did I get it right?

Correct.

People sometimes make the mistake of writing iterator adaptors that
don't respect the potential singularity of their iterator parameters,
but that's a different issue.

> The problem was that Pavol compared an uninitialized iterator of
> std::string internally _before_ checking its validity.
>
> BTW, I'm on the way to run the complete regressions for Intel 8 + STLPort.
>
> David, you didn't apply the patch, did you?

I did not apply any patches to anyone else's library.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

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