Subject: Re: [boost] [unordered] unordered_set::erase() complexity bug?
From: Daniel James (dnljms_at_[hidden])
Date: 2010-03-18 07:10:42
On 18 March 2010 09:54, Christopher Crickmar <cjcrickmar_at_[hidden]> wrote:
> Given that the next iterator is meaningless for an unordered container and
> that cached_begin_bucket_ is always valid would it be bad manners to always
> return begin() ?
The next iterator isn't meaningless, the elements in a container have
a sequence. While it isn't fixed, it never changes due to an erase.
The main reason for returning the next iterator is so that you can
iterate through a container erasing elements as you go, returning
'begin()' would break that.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk