This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Remove redundant std::move in std::for_each
- From: Daniel Krügler <daniel dot kruegler at gmail dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 15 Jul 2016 21:54:41 +0200
- Subject: Re: [PATCH] Remove redundant std::move in std::for_each
- Authentication-results: sourceware.org; auth=none
- References: <20160715195301.GA21378@redhat.com>
2016-07-15 21:53 GMT+02:00 Jonathan Wakely <jwakely@redhat.com>:
> Returning a parameter will try to move anyway, so using std::move here
> is redundant (and clang even warns about it being redundant).
>
> * include/bits/stl_algo.h (for_each): Remove redundant _GLIBCXX_MOVE
> and adjust comment.
Actually I think this should also be reported as an LWG issue.
- Daniel