diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-10-07 16:33:59 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-10-07 16:33:59 +0000 |
| commit | 41854acbb6be2042f64f275154a9a4bf194e8bf4 (patch) | |
| tree | 128bbf6e1b1bc763832380081aa55ef3bc358778 /libstdc++-v3/include/debug/deque | |
| parent | 18155f9b8ef77803a76041d0b424a59a614a28b4 (diff) | |
| download | ppe42-gcc-41854acbb6be2042f64f275154a9a4bf194e8bf4.tar.gz ppe42-gcc-41854acbb6be2042f64f275154a9a4bf194e8bf4.zip | |
2007-10-07 Chris Jefferson <chris@bubblescope.net>
Paolo Carlini <pcarlini@suse.de>
* include/debug/list (list<>::list(list&&),
list<>::operator=(list&&)): Add.
(list<>::swap): Adjust.
(swap(list&&, list& __y), swap(list&, list&& __y)): Add.
* include/debug/vector (vector<>::vector(vector&&),
vector<>::operator=(vector&&)): Add.
(vector<>::swap): Adjust.
(swap(vector&&, vector& __y), swap(vector&, vector&& __y)): Add.
* include/debug/deque (deque<>::deque(deque&&),
deque<>::operator=(deque&&)): Add.
(deque<>::swap): Adjust.
(swap(deque&&, deque& __y), swap(deque&, deque&& __y)): Add.
* include/debug/set.h (set<>::set(set&&),
set<>::operator=(set&&)): Add.
(set<>::swap): Adjust.
(swap(set&&, set& __y), swap(set&, set&& __y)): Add.
* include/debug/map.h (map<>::map(map&&),
map<>::operator=(map&&)): Add.
(map<>::swap): Adjust.
(swap(map&&, map& __y), swap(map&, map&& __y)): Add.
* include/debug/multiset.h (multiset<>::multiset(multiset&&),
multiset<>::operator=(multiset&&)): Add.
(smultiet<>::swap): Adjust.
(swap(multiset&&, multiset& __y),
swap(multiset&, multiset&& __y)): Add.
* include/debug/multimap.h (multimap<>::multimap(multimap&&),
multimap<>::operator=(multimap&&)): Add.
(multimap<>::swap): Adjust.
(swap(multimap&&, multimap& __y),
swap(multimap&, multimap&& __y)): Add.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129071 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/debug/deque')
| -rw-r--r-- | libstdc++-v3/include/debug/deque | 52 |
1 files changed, 44 insertions, 8 deletions
diff --git a/libstdc++-v3/include/debug/deque b/libstdc++-v3/include/debug/deque index 2bf4a19cf8b..56db8ee2b00 100644 --- a/libstdc++-v3/include/debug/deque +++ b/libstdc++-v3/include/debug/deque @@ -1,6 +1,6 @@ // Debugging deque implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005 +// Copyright (C) 2003, 2004, 2005, 2006, 2007 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -84,20 +84,37 @@ namespace __debug : _Base(__gnu_debug::__check_valid_range(__first, __last), __last, __a) { } - deque(const deque<_Tp,_Allocator>& __x) : _Base(__x), _Safe_base() { } + deque(const deque& __x) + : _Base(__x), _Safe_base() { } - deque(const _Base& __x) : _Base(__x), _Safe_base() { } + deque(const _Base& __x) + : _Base(__x), _Safe_base() { } + +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + deque(deque&& __x) + : _Base(__x), _Safe_base() + { this->_M_swap(__x); } +#endif ~deque() { } - deque<_Tp,_Allocator>& - operator=(const deque<_Tp,_Allocator>& __x) + deque& + operator=(const deque& __x) { *static_cast<_Base*>(this) = __x; this->_M_invalidate_all(); return *this; } +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + deque& + operator=(deque&& __x) + { + swap(__x); + return *this; + } +#endif + template<class _InputIterator> void assign(_InputIterator __first, _InputIterator __last) @@ -329,7 +346,11 @@ namespace __debug } void - swap(deque<_Tp,_Allocator>& __x) +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + swap(deque&& __x) +#else + swap(deque& __x) +#endif { _Base::swap(__x); this->_M_swap(__x); @@ -363,7 +384,8 @@ namespace __debug template<typename _Tp, typename _Alloc> inline bool - operator<(const deque<_Tp, _Alloc>& __lhs, const deque<_Tp, _Alloc>& __rhs) + operator<(const deque<_Tp, _Alloc>& __lhs, + const deque<_Tp, _Alloc>& __rhs) { return __lhs._M_base() < __rhs._M_base(); } template<typename _Tp, typename _Alloc> @@ -380,13 +402,27 @@ namespace __debug template<typename _Tp, typename _Alloc> inline bool - operator>(const deque<_Tp, _Alloc>& __lhs, const deque<_Tp, _Alloc>& __rhs) + operator>(const deque<_Tp, _Alloc>& __lhs, + const deque<_Tp, _Alloc>& __rhs) { return __lhs._M_base() > __rhs._M_base(); } template<typename _Tp, typename _Alloc> inline void swap(deque<_Tp, _Alloc>& __lhs, deque<_Tp, _Alloc>& __rhs) { __lhs.swap(__rhs); } + +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + template<typename _Tp, typename _Alloc> + inline void + swap(deque<_Tp, _Alloc>&& __lhs, deque<_Tp, _Alloc>& __rhs) + { __lhs.swap(__rhs); } + + template<typename _Tp, typename _Alloc> + inline void + swap(deque<_Tp, _Alloc>& __lhs, deque<_Tp, _Alloc>&& __rhs) + { __lhs.swap(__rhs); } +#endif + } // namespace __debug } // namespace std |

