This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] libstdc++/20787 (DR 130)
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Geoffrey Keating <geoffk at geoffk dot org>
- Cc: Paolo Carlini <pcarlini at suse dot de>, libstdc++ at gcc dot gnu dot org
- Date: 03 Sep 2005 01:41:31 +0200
- Subject: Re: [Patch] libstdc++/20787 (DR 130)
- References: <431845BB.9010408@suse.de> <m264tjrrkn.fsf@greed.local>
Geoffrey Keating <geoffk@geoffk.org> writes:
| 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?
It is.
| > - 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.
indeed, ABI-compabitility-wise.
-- Gaby