Commit 87839f22 by Jonathan Wakely Committed by Jonathan Wakely

re PR libstdc++/58357 (In C++11 std::rotate(first, middle, last) now should…

re PR libstdc++/58357 (In C++11 std::rotate(first, middle, last) now should return a forward iterator to  first + (last - middle).)

	PR libstdc++/58357
	* include/bits/algorithmfwd.h (rotate): Move to inline namespace _V2.
	* include/bits/stl_algo.h (__rotate, rotate): Likewise.

From-SVN: r220823
parent 1c10e0ce
2015-02-19 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/58357
* include/bits/algorithmfwd.h (rotate): Move to inline namespace _V2.
* include/bits/stl_algo.h (__rotate, rotate): Likewise.
2015-02-19 Hans-Peter Nilsson <hp@axis.com> 2015-02-19 Hans-Peter Nilsson <hp@axis.com>
PR testsuite/65093 PR testsuite/65093
......
...@@ -530,9 +530,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -530,9 +530,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_OIter _OIter
reverse_copy(_BIter, _BIter, _OIter); reverse_copy(_BIter, _BIter, _OIter);
template<typename _FIter> inline namespace _V2
_FIter {
rotate(_FIter, _FIter, _FIter); template<typename _FIter>
_FIter
rotate(_FIter, _FIter, _FIter);
}
template<typename _FIter, typename _OIter> template<typename _FIter, typename _OIter>
_OIter _OIter
......
...@@ -1237,6 +1237,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1237,6 +1237,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return __m; return __m;
} }
inline namespace _V2
{
/// This is a helper function for the rotate algorithm. /// This is a helper function for the rotate algorithm.
template<typename _ForwardIterator> template<typename _ForwardIterator>
_ForwardIterator _ForwardIterator
...@@ -1438,6 +1441,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1438,6 +1441,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
std::__iterator_category(__first)); std::__iterator_category(__first));
} }
} // namespace _V2
/** /**
* @brief Copy a sequence, rotating its elements. * @brief Copy a sequence, rotating its elements.
* @ingroup mutating_algorithms * @ingroup mutating_algorithms
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment