From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: "libstdc++" <libstdc++@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch] Fix libstdc++/55043 - issue with nesting unordered_map containing unique_ptr into vector
Date: Wed, 16 Jan 2013 09:44:00 -0000 [thread overview]
Message-ID: <CAH6eHdTmhuuBybRGEsDnQ1SxGx9=jbs3rLugNB54m6vfiMUezQ@mail.gmail.com> (raw)
In-Reply-To: <CAH6eHdT2avC6qkM6Y7u4mAvj49TMc2-GiJ+eZxGHzJv8EttEJw@mail.gmail.com>
On 16 January 2013 09:25, Jonathan Wakely wrote:
> This fixes a regression caused by supporting the C++11 allocator
> requirements in std::vector, and the fact that the unordered
> containers don't have noexcept move constructors. Fixed by
> specializing is_copy_constructible for the unordered containers so
> vector doesn't try to copy them when their element type is not
> CopyInsertable into the container, and instead resorts to a move that
> might throw.
>
> PR libstdc++/55043
> * include/std/unordered_map: Include alloc_traits.h
> * include/std/unordered_set: Likewise.
> * include/bits/alloc_traits.h: Define __is_copy_insertable.
> * include/bits/unordered_map.h: Use it.
> * include/bits/unordered_set.h: Likewise.
> * include/debug/unordered_map.h: Likewise.
> * include/debug/unordered_set.h: Likewise.
> * include/profile/unordered_map.h: Likewise.
> * include/profile/unordered_set.h: Likewise.
> * include/bits/hashtable.h: Fix comment typos.
> * testsuite/23_containers/unordered_map/55043.cc: New.
> * testsuite/23_containers/unordered_multimap/55043.cc: New.
> * testsuite/23_containers/unordered_multiset/55043.cc: New.
> * testsuite/23_containers/unordered_set/55043.cc: New.
>
> Tested x86_64-linux, in normal, debug and profile modes.
> Committed to trunk, to be committed to the 4.7 branch shortly.
Daniel K has pointed out a problem with this fix, so I'll try to fix
it again, properly, this evening.
next prev parent reply other threads:[~2013-01-16 9:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-16 9:25 Jonathan Wakely
2013-01-16 9:44 ` Jonathan Wakely [this message]
2013-01-16 23:57 ` Jonathan Wakely
2013-02-18 22:40 ` Jonathan Wakely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH6eHdTmhuuBybRGEsDnQ1SxGx9=jbs3rLugNB54m6vfiMUezQ@mail.gmail.com' \
--to=jwakely.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).