From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27057 invoked by alias); 24 Dec 2014 20:08:36 -0000 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 Received: (qmail 27029 invoked by uid 48); 24 Dec 2014 20:08:32 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/58876] No non-virtual-dtor warning in std::unique_ptr Date: Wed, 24 Dec 2014 20:08: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-Version: 4.8.1 X-Bugzilla-Keywords: diagnostic 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-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-12/txt/msg02718.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58876 --- Comment #8 from Jonathan Wakely --- No, really, that's not how make_unique works. You do not use 'new' with make_unique, that's the whole point, so you would say make_unique() to create a B. Your motivating examples should be valid C++ of you want to convince anyone, so maybe: unique_ptr p = make_unique();