From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10209 invoked by alias); 23 Nov 2016 21:19:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 8806 invoked by uid 89); 23 Nov 2016 21:19:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_20,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=baldwin, Baldwin, HX-PHP-Originating-Script:rcube.php X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 Nov 2016 21:19:31 +0000 Received: by simark.ca (Postfix, from userid 33) id BD8C21E141; Wed, 23 Nov 2016 16:19:29 -0500 (EST) To: John Baldwin Subject: Re: [PATCH 3/3] Do not use std::move when assigning an anonymous object to a unique_ptr. X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 23 Nov 2016 21:19:00 -0000 From: Simon Marchi Cc: gdb-patches@sourceware.org In-Reply-To: <20161123200652.89209-4-jhb@FreeBSD.org> References: <20161123200652.89209-1-jhb@FreeBSD.org> <20161123200652.89209-4-jhb@FreeBSD.org> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.2 X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00692.txt.bz2 On 2016-11-23 15:06, John Baldwin wrote: > Using std::move forces an extra copy of the object. These changes fix > -Wpessimizing-move warnings from clang. For those who, like me, do not quite understand what is happening here, I suggest the following read: https://www.ibm.com/developerworks/community/blogs/5894415f-be62-4bc0-81c5-3956e82276f3/entry/RVO_V_S_std_move?lang=en