[Patch] libstdc++/20787 (DR 130)
Geoffrey Keating
geoffk@geoffk.org
Fri Sep 2 23:13:00 GMT 2005
Paolo Carlini <pcarlini@suse.de> writes:
> Hi,
>
> a few days ago I noticed that the relevant DR in the meanwhile has been
> moved to [DR] status and decided to reconsider implementing its
> resolution. Indeed, apparently there is a very large consensus (see also
> Effective STL, outside the LWG references proper, f.i.) that changing
> the associative containers consistently with all the other containers is
> a good thing. The only minor disadvantage seems that a single
> erase(iterator) becomes computationally a little more expensive, due to
> the additional iterator increment (however, this is not the case for
> erase(iterator, iterator), because its internal loop can now make use of
> the erase(iterator) return value, i.e., the very same idiom used in
> list::erase).
>
> Anyone disagreeing with adding the below to mainline?!?
Isn't this a binary incompatible change?
> - void
> + iterator
> erase(iterator __position)
> - { _M_t.erase(__position); }
> + { return _M_t.erase(__position); }
It might happen to be OK on some platforms, but I doubt it would be
safe on all.
There are other changes that look unsafe, in fact most of the header
changes.
More information about the Libstdc++
mailing list