public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* std::multimap preserving order in erase() and insert()?
@ 2012-11-28  7:24 Hei Chan
  2012-11-28  9:41 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Hei Chan @ 2012-11-28  7:24 UTC (permalink / raw)
  To: gcc-help

Hi,

I have a similar question to this: http://stackoverflow.com/questions/2643473/does-stdmultiset-guarantee-insertion-order


I wonder whether GCC 4.6.2 has already implemented the part of c11 standard that guarantees to preserve the order of insertion as well as the order of insertion of erasure in std::multimap.

Thanks in advance.


Cheers,
Hei

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: std::multimap preserving order in erase() and insert()?
  2012-11-28  7:24 std::multimap preserving order in erase() and insert()? Hei Chan
@ 2012-11-28  9:41 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2012-11-28  9:41 UTC (permalink / raw)
  To: Hei Chan; +Cc: gcc-help

On 28 November 2012 07:24, Hei Chan wrote:
> Hi,
>
> I have a similar question to this: http://stackoverflow.com/questions/2643473/does-stdmultiset-guarantee-insertion-order
>
>
> I wonder whether GCC 4.6.2 has already implemented the part of c11 standard that guarantees to preserve the order of insertion as well as the order of insertion of erasure in std::multimap.

GCC has always provided that guarantee.

If you read the linked papers and DRs you'll see that they say all
current [as of 2002] implementations provide stable ordering, even
though it wasn't stated as a requirement by the previous standard.

http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#371
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1780.html#Equal
range stability

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-28  9:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-28  7:24 std::multimap preserving order in erase() and insert()? Hei Chan
2012-11-28  9:41 ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).