diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2015-02-19 20:57:40 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2015-02-19 20:57:40 +0000 |
commit | 87839f22d2cc6b6c550f9b971275bf55d61cb84c (patch) | |
tree | c8833cc30fd4e005bd82ec30809eedeb7e286538 | |
parent | 1c10e0cecc0c99f9b729beea47bbfb563c5dd84e (diff) | |
download | gcc-87839f22d2cc6b6c550f9b971275bf55d61cb84c.zip gcc-87839f22d2cc6b6c550f9b971275bf55d61cb84c.tar.gz gcc-87839f22d2cc6b6c550f9b971275bf55d61cb84c.tar.bz2 |
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
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/algorithmfwd.h | 9 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_algo.h | 5 |
3 files changed, 17 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 01e2268..79a3bd7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +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> PR testsuite/65093 diff --git a/libstdc++-v3/include/bits/algorithmfwd.h b/libstdc++-v3/include/bits/algorithmfwd.h index 11361bb..1dfc4ad 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<typename _FIter> - _FIter - rotate(_FIter, _FIter, _FIter); + inline namespace _V2 + { + template<typename _FIter> + _FIter + rotate(_FIter, _FIter, _FIter); + } template<typename _FIter, typename _OIter> _OIter diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h index c27c092..53c455b 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<typename _ForwardIterator> _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 |