diff options
Diffstat (limited to 'libcxx/include/deque')
| -rw-r--r-- | libcxx/include/deque | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/libcxx/include/deque b/libcxx/include/deque index c10bd3672e1..b0b778a56ce 100644 --- a/libcxx/include/deque +++ b/libcxx/include/deque @@ -964,8 +964,10 @@ protected: _LIBCPP_INLINE_VISIBILITY const allocator_type& __alloc() const _NOEXCEPT {return __size_.second();} + _LIBCPP_INLINE_VISIBILITY __deque_base() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value); + _LIBCPP_INLINE_VISIBILITY explicit __deque_base(const allocator_type& __a); public: ~__deque_base(); @@ -1090,13 +1092,13 @@ __deque_base<_Tp, _Allocator>::end() const _NOEXCEPT } template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline __deque_base<_Tp, _Allocator>::__deque_base() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value) : __start_(0), __size_(0) {} template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline __deque_base<_Tp, _Allocator>::__deque_base(const allocator_type& __a) : __map_(__pointer_allocator(__a)), __start_(0), __size_(0, __a) {} @@ -1241,8 +1243,11 @@ public: #endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES + _LIBCPP_INLINE_VISIBILITY deque(deque&& __c) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value); + _LIBCPP_INLINE_VISIBILITY deque(deque&& __c, const allocator_type& __a); + _LIBCPP_INLINE_VISIBILITY deque& operator=(deque&& __c) _NOEXCEPT_(__alloc_traits::propagate_on_container_move_assignment::value && is_nothrow_move_assignable<allocator_type>::value); @@ -1261,6 +1266,7 @@ public: void assign(initializer_list<value_type> __il) {assign(__il.begin(), __il.end());} #endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + _LIBCPP_INLINE_VISIBILITY allocator_type get_allocator() const _NOEXCEPT; // iterators: @@ -1313,13 +1319,21 @@ public: bool empty() const _NOEXCEPT {return __base::size() == 0;} // element access: + _LIBCPP_INLINE_VISIBILITY reference operator[](size_type __i); + _LIBCPP_INLINE_VISIBILITY const_reference operator[](size_type __i) const; + _LIBCPP_INLINE_VISIBILITY reference at(size_type __i); + _LIBCPP_INLINE_VISIBILITY const_reference at(size_type __i) const; + _LIBCPP_INLINE_VISIBILITY reference front(); + _LIBCPP_INLINE_VISIBILITY const_reference front() const; + _LIBCPP_INLINE_VISIBILITY reference back(); + _LIBCPP_INLINE_VISIBILITY const_reference back() const; // 23.2.2.3 modifiers: @@ -1358,6 +1372,7 @@ public: iterator erase(const_iterator __p); iterator erase(const_iterator __f, const_iterator __l); + _LIBCPP_INLINE_VISIBILITY void swap(deque& __c) #if _LIBCPP_STD_VER >= 14 _NOEXCEPT; @@ -1365,6 +1380,7 @@ public: _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable<allocator_type>::value); #endif + _LIBCPP_INLINE_VISIBILITY void clear() _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY @@ -1537,7 +1553,7 @@ deque<_Tp, _Allocator>::operator=(const deque& __c) #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline deque<_Tp, _Allocator>::deque(deque&& __c) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value) : __base(_VSTD::move(__c)) @@ -1545,7 +1561,7 @@ deque<_Tp, _Allocator>::deque(deque&& __c) } template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline deque<_Tp, _Allocator>::deque(deque&& __c, const allocator_type& __a) : __base(_VSTD::move(__c), __a) { @@ -1557,7 +1573,7 @@ deque<_Tp, _Allocator>::deque(deque&& __c, const allocator_type& __a) } template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline deque<_Tp, _Allocator>& deque<_Tp, _Allocator>::operator=(deque&& __c) _NOEXCEPT_(__alloc_traits::propagate_on_container_move_assignment::value && @@ -1641,7 +1657,7 @@ deque<_Tp, _Allocator>::assign(size_type __n, const value_type& __v) } template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline _Allocator deque<_Tp, _Allocator>::get_allocator() const _NOEXCEPT { @@ -1700,7 +1716,7 @@ deque<_Tp, _Allocator>::shrink_to_fit() _NOEXCEPT } template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline typename deque<_Tp, _Allocator>::reference deque<_Tp, _Allocator>::operator[](size_type __i) { @@ -1709,7 +1725,7 @@ deque<_Tp, _Allocator>::operator[](size_type __i) } template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline typename deque<_Tp, _Allocator>::const_reference deque<_Tp, _Allocator>::operator[](size_type __i) const { @@ -1718,7 +1734,7 @@ deque<_Tp, _Allocator>::operator[](size_type __i) const } template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline typename deque<_Tp, _Allocator>::reference deque<_Tp, _Allocator>::at(size_type __i) { @@ -1729,7 +1745,7 @@ deque<_Tp, _Allocator>::at(size_type __i) } template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline typename deque<_Tp, _Allocator>::const_reference deque<_Tp, _Allocator>::at(size_type __i) const { @@ -1740,7 +1756,7 @@ deque<_Tp, _Allocator>::at(size_type __i) const } template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline typename deque<_Tp, _Allocator>::reference deque<_Tp, _Allocator>::front() { @@ -1749,7 +1765,7 @@ deque<_Tp, _Allocator>::front() } template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline typename deque<_Tp, _Allocator>::const_reference deque<_Tp, _Allocator>::front() const { @@ -1758,7 +1774,7 @@ deque<_Tp, _Allocator>::front() const } template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline typename deque<_Tp, _Allocator>::reference deque<_Tp, _Allocator>::back() { @@ -1767,7 +1783,7 @@ deque<_Tp, _Allocator>::back() } template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline typename deque<_Tp, _Allocator>::const_reference deque<_Tp, _Allocator>::back() const { @@ -2806,7 +2822,7 @@ deque<_Tp, _Allocator>::__erase_to_end(const_iterator __f) } template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline void deque<_Tp, _Allocator>::swap(deque& __c) #if _LIBCPP_STD_VER >= 14 @@ -2820,7 +2836,7 @@ deque<_Tp, _Allocator>::swap(deque& __c) } template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline void deque<_Tp, _Allocator>::clear() _NOEXCEPT { |

