This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/3] Do not use std::move when assigning an anonymous object to a unique_ptr.
- From: Simon Marchi <simon dot marchi at polymtl dot ca>
- To: John Baldwin <jhb at freebsd dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 23 Nov 2016 16:19:29 -0500
- Subject: Re: [PATCH 3/3] Do not use std::move when assigning an anonymous object to a unique_ptr.
- Authentication-results: sourceware.org; auth=none
- References: <20161123200652.89209-1-jhb@FreeBSD.org> <20161123200652.89209-4-jhb@FreeBSD.org>
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