hashtable local iterator
Paolo Carlini
paolo.carlini@oracle.com
Wed Dec 14 10:18:00 GMT 2011
On 12/14/2011 01:49 AM, Paolo Carlini wrote:
>> - this new iterator type needs a pointer to its parent container to
>> work which is quite unusual on normal iterators.
> On the spot, I cannot see anything wrong with this. Normally, when
> such kinds of links are present one must be careful about what happens
> when one of the two changes without telling the other. Are we risking,
> I don't know, local iterators becoming invalid when they shouldn't?
In particular, I would double check swap, which is supposed to not
invalidate any iterator.
Besides what the Standard literally says, constant complexity, I think
it's very important from the QoI point of view that all the begin/end
member functions are very simple, because user code normally ends up
using those in loops, everywhere. If that means we have to use a little
more memory, I think it's in general fine (previous double checking what
the other implementations appear to be doing).
Please let us know asap how are we doing on this.
Paolo.
More information about the Libstdc++
mailing list