diff options
author | Paolo Carlini <pcarlini@suse.de> | 2007-10-08 20:02:11 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2007-10-08 20:02:11 +0000 |
commit | d98f312ce657e609c803c54cad4a57397d620668 (patch) | |
tree | b0ba8ee7957af2ac1c286b274e0760b453548d88 | |
parent | 0dd6a144c80984ac914740f973934231f64fd458 (diff) | |
download | gcc-d98f312ce657e609c803c54cad4a57397d620668.zip gcc-d98f312ce657e609c803c54cad4a57397d620668.tar.gz gcc-d98f312ce657e609c803c54cad4a57397d620668.tar.bz2 |
stl_move.h (_GLIBCXX_MOVE): Add.
2007-10-08 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_move.h (_GLIBCXX_MOVE): Add.
* include/bits/stl_algobase.h: Adjust.
* include/bits/stl_pair.h: Likewise.
* include/bits/stl_algo.h: Minor formatting fixes.
From-SVN: r129138
-rw-r--r-- | libstdc++-v3/ChangeLog | 8 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_algo.h | 17 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_algobase.h | 8 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_move.h | 3 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_pair.h | 2 |
5 files changed, 24 insertions, 14 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 32eeadf1..834f6ee 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2007-10-08 Paolo Carlini <pcarlini@suse.de> + + * include/bits/stl_move.h (_GLIBCXX_MOVE): Add. + * include/bits/stl_algobase.h: Adjust. + * include/bits/stl_pair.h: Likewise. + + * include/bits/stl_algo.h: Minor formatting fixes. + 2007-10-08 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/33489 diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h index a5b99c5..4f5bc27 100644 --- a/libstdc++-v3/include/bits/stl_algo.h +++ b/libstdc++-v3/include/bits/stl_algo.h @@ -123,7 +123,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp) { // concept requirements - __glibcxx_function_requires(_BinaryFunctionConcept<_Compare,bool,_Tp,_Tp>) + __glibcxx_function_requires(_BinaryFunctionConcept<_Compare, bool, + _Tp, _Tp>) if (__comp(__a, __b)) if (__comp(__b, __c)) return __b; @@ -515,7 +516,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) while (1) { _ForwardIterator1 __new_result - = _GLIBCXX_STD_P::search(__first1, __last1, __first2, __last2, __comp); + = _GLIBCXX_STD_P::search(__first1, __last1, __first2, + __last2, __comp); if (__new_result == __last1) return __result; else @@ -548,7 +550,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _RevIterator1 __rlast1(__first1); _RevIterator2 __rlast2(__first2); - _RevIterator1 __rresult = _GLIBCXX_STD_P::search(_RevIterator1(__last1), __rlast1, _RevIterator2(__last2), __rlast2); + _RevIterator1 __rresult = _GLIBCXX_STD_P::search(_RevIterator1(__last1), + __rlast1, + _RevIterator2(__last2), + __rlast2); if (__rresult == __rlast1) return __last1; @@ -2760,7 +2765,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__len1 <= __len2 && __len1 <= __buffer_size) { _Pointer __buffer_end = std::copy(__first, __middle, __buffer); - _GLIBCXX_STD_P::merge(__buffer, __buffer_end, __middle, __last, __first, __comp); + _GLIBCXX_STD_P::merge(__buffer, __buffer_end, __middle, __last, + __first, __comp); } else if (__len2 <= __buffer_size) { @@ -3071,7 +3077,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) std::__insertion_sort(__first, __last); } - template<typename _RandomAccessIterator, typename _Distance, typename _Compare> + template<typename _RandomAccessIterator, typename _Distance, + typename _Compare> void __chunk_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h index 9d055fc..64b13a5 100644 --- a/libstdc++-v3/include/bits/stl_algobase.h +++ b/libstdc++-v3/include/bits/stl_algobase.h @@ -73,13 +73,7 @@ #include <bits/stl_iterator.h> #include <bits/concept_check.h> #include <debug/debug.h> - -#ifdef __GXX_EXPERIMENTAL_CXX0X__ -# include <bits/stl_move.h> -# define _GLIBCXX_MOVE(_Tp) std::move(_Tp) -#else -# define _GLIBCXX_MOVE(_Tp) _Tp -#endif +#include <bits/stl_move.h> // For _GLIBCXX_MOVE _GLIBCXX_BEGIN_NAMESPACE(std) diff --git a/libstdc++-v3/include/bits/stl_move.h b/libstdc++-v3/include/bits/stl_move.h index 73d5122..3c799e4 100644 --- a/libstdc++-v3/include/bits/stl_move.h +++ b/libstdc++-v3/include/bits/stl_move.h @@ -59,6 +59,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _GLIBCXX_END_NAMESPACE +#define _GLIBCXX_MOVE(_Tp) std::move(_Tp) +#else +#define _GLIBCXX_MOVE(_Tp) _Tp #endif #endif /* _STL_MOVE_H */ diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h index 9740526..68927d2 100644 --- a/libstdc++-v3/include/bits/stl_pair.h +++ b/libstdc++-v3/include/bits/stl_pair.h @@ -62,9 +62,7 @@ #ifndef _STL_PAIR_H #define _STL_PAIR_H 1 -#ifdef __GXX_EXPERIMENTAL_CXX0X__ #include <bits/stl_move.h> -#endif _GLIBCXX_BEGIN_NAMESPACE(std) |