123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- #ifndef _GLIBCXX_PROFILE_DEQUE
- #define _GLIBCXX_PROFILE_DEQUE 1
- #include <deque>
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- namespace __profile
- {
-
- template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
- class deque
- : public _GLIBCXX_STD_C::deque<_Tp, _Allocator>
- {
- typedef _GLIBCXX_STD_C::deque<_Tp, _Allocator> _Base;
- public:
- typedef typename _Base::size_type size_type;
- typedef typename _Base::value_type value_type;
-
- #if __cplusplus < 201103L
- deque()
- : _Base() { }
- deque(const deque& __x)
- : _Base(__x) { }
- ~deque() { }
- #else
- deque() = default;
- deque(const deque&) = default;
- deque(deque&&) = default;
- deque(const deque& __d, const _Allocator& __a)
- : _Base(__d, __a) { }
- deque(deque&& __d, const _Allocator& __a)
- : _Base(std::move(__d), __a) { }
- ~deque() = default;
- deque(initializer_list<value_type> __l,
- const _Allocator& __a = _Allocator())
- : _Base(__l, __a) { }
- #endif
- explicit
- deque(const _Allocator& __a)
- : _Base(__a) { }
- #if __cplusplus >= 201103L
- explicit
- deque(size_type __n, const _Allocator& __a = _Allocator())
- : _Base(__n, __a) { }
- deque(size_type __n, const _Tp& __value,
- const _Allocator& __a = _Allocator())
- : _Base(__n, __value, __a) { }
- #else
- explicit
- deque(size_type __n, const _Tp& __value = _Tp(),
- const _Allocator& __a = _Allocator())
- : _Base(__n, __value, __a) { }
- #endif
- #if __cplusplus >= 201103L
- template<typename _InputIterator,
- typename = std::_RequireInputIter<_InputIterator>>
- #else
- template<typename _InputIterator>
- #endif
- deque(_InputIterator __first, _InputIterator __last,
- const _Allocator& __a = _Allocator())
- : _Base(__first, __last, __a)
- { }
- deque(const _Base& __x)
- : _Base(__x) { }
- #if __cplusplus < 201103L
- deque&
- operator=(const deque& __x)
- {
- _M_base() = __x;
- return *this;
- }
- #else
- deque&
- operator=(const deque&) = default;
- deque&
- operator=(deque&&) = default;
- deque&
- operator=(initializer_list<value_type> __l)
- {
- _M_base() = __l;
- return *this;
- }
- #endif
- void
- swap(deque& __x)
- #if __cplusplus >= 201103L
- noexcept( noexcept(declval<_Base>().swap(__x)) )
- #endif
- { _Base::swap(__x); }
- _Base&
- _M_base() _GLIBCXX_NOEXCEPT { return *this; }
- const _Base&
- _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
- };
- template<typename _Tp, typename _Alloc>
- inline bool
- operator==(const deque<_Tp, _Alloc>& __lhs,
- const deque<_Tp, _Alloc>& __rhs)
- { return __lhs._M_base() == __rhs._M_base(); }
- template<typename _Tp, typename _Alloc>
- inline bool
- operator!=(const deque<_Tp, _Alloc>& __lhs,
- const deque<_Tp, _Alloc>& __rhs)
- { return __lhs._M_base() != __rhs._M_base(); }
- template<typename _Tp, typename _Alloc>
- inline bool
- operator<(const deque<_Tp, _Alloc>& __lhs,
- const deque<_Tp, _Alloc>& __rhs)
- { return __lhs._M_base() < __rhs._M_base(); }
- template<typename _Tp, typename _Alloc>
- inline bool
- operator<=(const deque<_Tp, _Alloc>& __lhs,
- const deque<_Tp, _Alloc>& __rhs)
- { return __lhs._M_base() <= __rhs._M_base(); }
- template<typename _Tp, typename _Alloc>
- inline bool
- operator>=(const deque<_Tp, _Alloc>& __lhs,
- const deque<_Tp, _Alloc>& __rhs)
- { return __lhs._M_base() >= __rhs._M_base(); }
- template<typename _Tp, typename _Alloc>
- inline bool
- 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); }
- }
- }
- #endif
|