diff options
Diffstat (limited to 'system/include/libcxx/deque')
-rw-r--r-- | system/include/libcxx/deque | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/system/include/libcxx/deque b/system/include/libcxx/deque index 87cbe599..b86d77f9 100644 --- a/system/include/libcxx/deque +++ b/system/include/libcxx/deque @@ -150,7 +150,9 @@ template <class T, class Allocator> */ +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header +#endif #include <__config> #include <__split_buffer> @@ -160,6 +162,8 @@ template <class T, class Allocator> #include <algorithm> #include <stdexcept> +#include <__undef_min_max> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _Tp, class _Allocator> class __deque_base; @@ -276,10 +280,10 @@ public: _LIBCPP_INLINE_VISIBILITY __deque_iterator() _NOEXCEPT {} - template <class _P, class _R, class _MP> + template <class _Pp, class _Rp, class _MP> _LIBCPP_INLINE_VISIBILITY - __deque_iterator(const __deque_iterator<value_type, _P, _R, _MP, difference_type, __block_size>& __it, - typename enable_if<is_convertible<_P, pointer>::value>::type* = 0) _NOEXCEPT + __deque_iterator(const __deque_iterator<value_type, _Pp, _Rp, _MP, difference_type, __block_size>& __it, + typename enable_if<is_convertible<_Pp, pointer>::value>::type* = 0) _NOEXCEPT : __m_iter_(__it.__m_iter_), __ptr_(__it.__ptr_) {} _LIBCPP_INLINE_VISIBILITY reference operator*() const {return *__ptr_;} @@ -405,9 +409,9 @@ private: _LIBCPP_INLINE_VISIBILITY __deque_iterator(__map_iterator __m, pointer __p) _NOEXCEPT : __m_iter_(__m), __ptr_(__p) {} - template <class _Tp, class _A> friend class __deque_base; - template <class _Tp, class _A> friend class _LIBCPP_VISIBLE deque; - template <class _V, class _P, class _R, class _MP, class _D, _D> + template <class _Tp, class _Ap> friend class __deque_base; + template <class _Tp, class _Ap> friend class _LIBCPP_VISIBLE deque; + template <class _Vp, class _Pp, class _Rp, class _MP, class _Dp, _Dp> friend class _LIBCPP_VISIBLE __deque_iterator; template <class _RAIter, @@ -984,7 +988,7 @@ private: } _LIBCPP_INLINE_VISIBILITY - void __move_assign_alloc(__deque_base& __c, false_type) _NOEXCEPT + void __move_assign_alloc(__deque_base&, false_type) _NOEXCEPT {} _LIBCPP_INLINE_VISIBILITY @@ -1003,7 +1007,7 @@ private: } _LIBCPP_INLINE_VISIBILITY - static void __swap_alloc(allocator_type& __x, allocator_type& __y, false_type) + static void __swap_alloc(allocator_type&, allocator_type&, false_type) _NOEXCEPT {} }; @@ -1399,7 +1403,7 @@ private: } _LIBCPP_INLINE_VISIBILITY - void __copy_assign_alloc(const deque& __c, false_type) + void __copy_assign_alloc(const deque&, false_type) {} void __move_assign(deque& __c, true_type) @@ -1506,8 +1510,8 @@ deque<_Tp, _Allocator>::deque(deque&& __c, const allocator_type& __a) { if (__a != __c.__alloc()) { - typedef move_iterator<iterator> _I; - assign(_I(__c.begin()), _I(__c.end())); + typedef move_iterator<iterator> _Ip; + assign(_Ip(__c.begin()), _Ip(__c.end())); } } @@ -1529,8 +1533,8 @@ deque<_Tp, _Allocator>::__move_assign(deque& __c, false_type) { if (__base::__alloc() != __c.__alloc()) { - typedef move_iterator<iterator> _I; - assign(_I(__c.begin()), _I(__c.end())); + typedef move_iterator<iterator> _Ip; + assign(_Ip(__c.begin()), _Ip(__c.end())); } else __move_assign(__c, true_type()); @@ -1962,6 +1966,7 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args) } else { + value_type __tmp(_VSTD::forward<_Args>(__args)...); iterator __b = __base::begin(); iterator __bm1 = _VSTD::prev(__b); __alloc_traits::construct(__a, _VSTD::addressof(*__bm1), _VSTD::move(*__b)); @@ -1969,7 +1974,7 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args) ++__base::size(); if (__pos > 1) __b = _VSTD::move(_VSTD::next(__b), __b + __pos, __b); - *__b = value_type(_VSTD::forward<_Args>(__args)...); + *__b = _VSTD::move(__tmp); } } else @@ -1985,13 +1990,14 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args) } else { + value_type __tmp(_VSTD::forward<_Args>(__args)...); iterator __e = __base::end(); iterator __em1 = _VSTD::prev(__e); __alloc_traits::construct(__a, _VSTD::addressof(*__e), _VSTD::move(*__em1)); ++__base::size(); if (__de > 1) __e = _VSTD::move_backward(__e - __de, __em1, __e); - *--__e = value_type(_VSTD::forward<_Args>(__args)...); + *--__e = _VSTD::move(__tmp); } } return __base::begin() + __pos; |