[gcc(refs/users/ppalka/heads/libstdcxx-constrained-algos)] Revert the perfect forwarding change to __niter_base
Patrick Palka
ppalka@gcc.gnu.org
Thu Jan 23 16:25:00 GMT 2020
https://gcc.gnu.org/g:c464c42f72e2c62b31556c76bf0f50faf50faaa6
commit c464c42f72e2c62b31556c76bf0f50faf50faaa6
Author: Patrick Palka <ppalka@redhat.com>
Date: Thu Jan 23 11:23:12 2020 -0500
Revert the perfect forwarding change to __niter_base
__niter_base no longer has to do perfect forwarding of its argument, as the
necessary std::move()'s have been added to the relevant users of this helper.
This partially reverts commit 9a68297e5deafdf404aa6a434b5a706ba50d57cc.
Diff:
---
libstdc++-v3/include/bits/stl_algobase.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h
index 3492ea2..ea8f402 100644
--- a/libstdc++-v3/include/bits/stl_algobase.h
+++ b/libstdc++-v3/include/bits/stl_algobase.h
@@ -334,10 +334,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// remove the __normal_iterator wrapper. See copy, fill, ...
template<typename _Iterator>
_GLIBCXX20_CONSTEXPR
- inline _Iterator&&
- __niter_base(_Iterator&& __it)
+ inline _Iterator
+ __niter_base(_Iterator __it)
_GLIBCXX_NOEXCEPT_IF(std::is_nothrow_copy_constructible<_Iterator>::value)
- { return std::forward<_Iterator>(__it); }
+ { return __it; }
// Reverse the __niter_base transformation to get a
// __normal_iterator back again (this assumes that __normal_iterator
More information about the Libstdc++-cvs
mailing list