From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5483 invoked by alias); 16 Jan 2013 10:26:28 -0000 Received: (qmail 4939 invoked by uid 48); 16 Jan 2013 10:25:59 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/55043] [4.7 Regression] issue with nesting unordered_map containing unique_ptr into vector Date: Wed, 16 Jan 2013 10:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.3 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg01490.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55043 --- Comment #26 from Jonathan Wakely 2013-01-16 10:25:57 UTC --- (In reply to comment #24) > That really feels like a hack. It is a hack, to work around a throwing move ctor that I don't have time to fix. > Anyone using boost::is_copy_constructible or > whatever personal trick to detect copyable types will still be impacted. Impacted in what way? They'll get the same result as they did previously. This changes std::is_copy_constructible to be more accurate and makes __move_if_noexcept work for the unordered containers. How does that affect boost::is_copy_constructible? It gives the wrong result for unordered_containers of non-copyable types, but already did, and it's not my responsibility to fix everyone else's traits :-) > Did > your idea in comment #15 not work? I don't think that would be conforming and would be a huge amount of work to replace every constructor in vector and forward_list (and every other container as they are updated to be allocator-aware) with a template constructor. I'm not going to work on that solution, and I won't approve patches to do that without a lot of persuasion. I still do want to use SFINAE to remove allocator_traits::construct(args) from participating in overload resolution when A().construct(args) is not valid and is_constructible is false, which I hope is conforming, and would allow a better solution similar to comment 17, by deleting the unordered_xxx copy ctor. I'll revisit the patch tonight.