From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27392 invoked by alias); 24 Oct 2012 01:24:17 -0000 Received: (qmail 27337 invoked by uid 48); 24 Oct 2012 01:24:03 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/55043] [4.7/4.8 Regression] issue with nesting unordered_map containing unique_ptr into vector Date: Wed, 24 Oct 2012 01:24: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: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC 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: 2012-10/txt/msg02138.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55043 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.kruegler at | |googlemail dot com --- Comment #8 from Jonathan Wakely 2012-10-24 01:24:02 UTC --- The problem reduces to this: #include #include struct M { M(M&&) { } }; template struct U { U(const U& n) : m(n.m) { } U(U&& n); T m; }; static_assert( std::is_copy_constructible>::value, "huh?" ); We need that static_assertion to fail because the type is *not* copy constructible. But it passes, because this compiles OK: decltype(::new U(std::declval&>())) n; Even though the definition of U(const U&) is ill-formed for a non-copyable template argument, using that constructor as an unevaluated operand compiles OK. Daniel, is this a bug in is_constructible?