diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-07-15 19:51:33 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-07-15 19:51:33 +0000 |
commit | 54ee8abfe62dc97f725843f58fe896eebcc52db0 (patch) | |
tree | 7d9a1eda0c709ee0bceae2e516082194aaccb91b | |
parent | 95b0f5e974ae6cd6d98ee74c8d27a51d06e93ff7 (diff) | |
download | gcc-54ee8abfe62dc97f725843f58fe896eebcc52db0.tar.gz |
Remove redundant std::move in std::for_each
* include/bits/stl_algo.h (for_each): Remove redundant _GLIBCXX_MOVE
and adjust comment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238399 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libstdc++-v3/ChangeLog | 3 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_algo.h | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 3e4a0f5b850..f3ca34ee343 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,8 @@ 2016-07-15 Jonathan Wakely <jwakely@redhat.com> + * include/bits/stl_algo.h (for_each): Remove redundant _GLIBCXX_MOVE + and adjust comment. + PR c++/58796 * libsupc++/pbase_type_info.cc (__pbase_type_info::__do_catch): Make nullptr match handlers of pointer type. diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h index a0820d4132f..ea0b56ca43f 100644 --- a/libstdc++-v3/include/bits/stl_algo.h +++ b/libstdc++-v3/include/bits/stl_algo.h @@ -3791,7 +3791,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * @param __first An input iterator. * @param __last An input iterator. * @param __f A unary function object. - * @return @p __f (std::move(@p __f) in C++0x). + * @return @p __f * * Applies the function object @p __f to each element in the range * @p [first,last). @p __f must not modify the order of the sequence. @@ -3806,7 +3806,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO __glibcxx_requires_valid_range(__first, __last); for (; __first != __last; ++__first) __f(*__first); - return _GLIBCXX_MOVE(__f); + return __f; // N.B. [alg.foreach] says std::move(f) but it's redundant. } /** |