From: Jonathan Wakely Date: Thu, 19 Feb 2015 20:57:40 +0000 (+0000) Subject: re PR libstdc++/58357 (In C++11 std::rotate(first, middle, last) now should return... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=87839f22d2cc6b6c550f9b971275bf55d61cb84c;p=gcc.git 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 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 01e22688cf9..79a3bd75f24 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2015-02-19 Jonathan Wakely + + 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 PR testsuite/65093 diff --git a/libstdc++-v3/include/bits/algorithmfwd.h b/libstdc++-v3/include/bits/algorithmfwd.h index 11361bb948a..1dfc4ad7b15 100644 --- a/libstdc++-v3/include/bits/algorithmfwd.h +++ b/libstdc++-v3/include/bits/algorithmfwd.h @@ -530,9 +530,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _OIter reverse_copy(_BIter, _BIter, _OIter); - template - _FIter - rotate(_FIter, _FIter, _FIter); + inline namespace _V2 + { + template + _FIter + rotate(_FIter, _FIter, _FIter); + } template _OIter diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h index c27c092c455..53c455b16f3 100644 --- a/libstdc++-v3/include/bits/stl_algo.h +++ b/libstdc++-v3/include/bits/stl_algo.h @@ -1237,6 +1237,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __m; } + inline namespace _V2 + { + /// This is a helper function for the rotate algorithm. template _ForwardIterator @@ -1438,6 +1441,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION std::__iterator_category(__first)); } + } // namespace _V2 + /** * @brief Copy a sequence, rotating its elements. * @ingroup mutating_algorithms