diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-07-04 19:20:19 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-02-08 19:02:26 +0000 |
commit | 81ad626541db97eb356e2c1d4a20eb2a26a766ab (patch) | |
tree | 311b6a8987c32b1e1dcbab65c54cfac3fdb56175 /contrib/llvm-project/libcxx/include/deque | |
parent | 5fff09660e06a66bed6482da9c70df328e16bbb6 (diff) | |
parent | 145449b1e420787bb99721a429341fa6be3adfb6 (diff) | |
download | src-81ad626541db97eb356e2c1d4a20eb2a26a766ab.tar.gz src-81ad626541db97eb356e2c1d4a20eb2a26a766ab.zip |
Merge llvm-project main llvmorg-15-init-15358-g53dc0f10787
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-15358-g53dc0f10787.
PR: 265425
MFC after: 2 weeks
Diffstat (limited to 'contrib/llvm-project/libcxx/include/deque')
-rw-r--r-- | contrib/llvm-project/libcxx/include/deque | 59 |
1 files changed, 48 insertions, 11 deletions
diff --git a/contrib/llvm-project/libcxx/include/deque b/contrib/llvm-project/libcxx/include/deque index e45d780e274f..d8f48f07954c 100644 --- a/contrib/llvm-project/libcxx/include/deque +++ b/contrib/llvm-project/libcxx/include/deque @@ -160,22 +160,52 @@ template <class T, class Allocator, class Predicate> */ +#include <__algorithm/copy.h> +#include <__algorithm/copy_backward.h> +#include <__algorithm/equal.h> +#include <__algorithm/fill_n.h> +#include <__algorithm/lexicographical_compare.h> +#include <__algorithm/min.h> +#include <__algorithm/remove.h> +#include <__algorithm/remove_if.h> +#include <__algorithm/unwrap_iter.h> +#include <__assert> // all public C++ headers provide the assertion handler #include <__config> -#include <__debug> +#include <__format/enable_insertable.h> #include <__iterator/iterator_traits.h> +#include <__iterator/next.h> +#include <__iterator/prev.h> +#include <__iterator/reverse_iterator.h> #include <__split_buffer> #include <__utility/forward.h> -#include <algorithm> -#include <compare> -#include <initializer_list> -#include <iterator> +#include <__utility/move.h> +#include <__utility/swap.h> #include <limits> #include <stdexcept> #include <type_traits> #include <version> +#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES +# include <algorithm> +# include <functional> +# include <iterator> +#endif + +// standard-mandated includes + +// [iterator.range] +#include <__iterator/access.h> +#include <__iterator/data.h> +#include <__iterator/empty.h> +#include <__iterator/reverse_access.h> +#include <__iterator/size.h> + +// [deque.syn] +#include <compare> +#include <initializer_list> + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header +# pragma GCC system_header #endif _LIBCPP_PUSH_MACROS @@ -442,7 +472,7 @@ public: {return !(__x < __y);} private: - _LIBCPP_INLINE_VISIBILITY __deque_iterator(__map_iterator __m, pointer __p) _NOEXCEPT + _LIBCPP_INLINE_VISIBILITY explicit __deque_iterator(__map_iterator __m, pointer __p) _NOEXCEPT : __m_iter_(__m), __ptr_(__p) {} template <class _Tp, class _Ap> friend class __deque_base; @@ -1304,7 +1334,7 @@ public: deque(_InputIter __f, _InputIter __l, const allocator_type& __a, typename enable_if<__is_cpp17_input_iterator<_InputIter>::value>::type* = 0); deque(const deque& __c); - deque(const deque& __c, const __identity_t<allocator_type>& __a); + deque(const deque& __c, const __type_identity_t<allocator_type>& __a); deque& operator=(const deque& __c); @@ -1318,7 +1348,7 @@ public: _LIBCPP_INLINE_VISIBILITY deque(deque&& __c) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value); _LIBCPP_INLINE_VISIBILITY - deque(deque&& __c, const __identity_t<allocator_type>& __a); + deque(deque&& __c, const __type_identity_t<allocator_type>& __a); _LIBCPP_INLINE_VISIBILITY deque& operator=(deque&& __c) _NOEXCEPT_(__alloc_traits::propagate_on_container_move_assignment::value && @@ -1640,7 +1670,7 @@ deque<_Tp, _Allocator>::deque(const deque& __c) } template <class _Tp, class _Allocator> -deque<_Tp, _Allocator>::deque(const deque& __c, const __identity_t<allocator_type>& __a) +deque<_Tp, _Allocator>::deque(const deque& __c, const __type_identity_t<allocator_type>& __a) : __base(__a) { __append(__c.begin(), __c.end()); @@ -1683,7 +1713,7 @@ deque<_Tp, _Allocator>::deque(deque&& __c) template <class _Tp, class _Allocator> inline -deque<_Tp, _Allocator>::deque(deque&& __c, const __identity_t<allocator_type>& __a) +deque<_Tp, _Allocator>::deque(deque&& __c, const __type_identity_t<allocator_type>& __a) : __base(_VSTD::move(__c), __a) { if (__a != __c.__alloc()) @@ -3019,8 +3049,15 @@ erase_if(deque<_Tp, _Allocator>& __c, _Predicate __pred) { __c.erase(_VSTD::remove_if(__c.begin(), __c.end(), __pred), __c.end()); return __old_size - __c.size(); } + +template <> +inline constexpr bool __format::__enable_insertable<std::deque<char>> = true; +#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS +template <> +inline constexpr bool __format::__enable_insertable<std::deque<wchar_t>> = true; #endif +#endif // _LIBCPP_STD_VER > 17 _LIBCPP_END_NAMESPACE_STD |