diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-04-03 13:57:21 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-04-03 13:57:21 +0300 |
commit | 07ff7621c09ff6414a48ec1757c72af1e5e1dbc0 (patch) | |
tree | 6700f4b0c2e985ad9b95399a22a70676bd2b9195 /contrib/libs/cxxsupp/libcxx/include/queue | |
parent | bb0d582a3fa3ddfc775c44fe32f24b6806606b7b (diff) | |
download | ydb-07ff7621c09ff6414a48ec1757c72af1e5e1dbc0.tar.gz |
intermediate changes
ref:8fcd56b3fe762902848ae3f9eabb01e1aa97432c
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/queue')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/queue | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/queue b/contrib/libs/cxxsupp/libcxx/include/queue index 03081eb844..9e1257b25e 100644 --- a/contrib/libs/cxxsupp/libcxx/include/queue +++ b/contrib/libs/cxxsupp/libcxx/include/queue @@ -41,6 +41,8 @@ public: explicit queue(const container_type& c); explicit queue(container_type&& c) + template<class InputIterator> + queue(InputIterator first, InputIterator last); // since C++23 template <class Alloc> explicit queue(const Alloc& a); template <class Alloc> @@ -51,6 +53,8 @@ public: queue(const queue& q, const Alloc& a); template <class Alloc> queue(queue&& q, const Alloc& a); + template <class InputIterator, class Alloc> + queue(InputIterator first, InputIterator last, const Alloc&); // since C++23 bool empty() const; size_type size() const; @@ -71,9 +75,17 @@ public: template<class Container> queue(Container) -> queue<typename Container::value_type, Container>; // C++17 +template<class InputIterator> + queue(InputIterator, InputIterator) -> queue<iter-value-type<InputIterator>>; // since C++23 + template<class Container, class Allocator> queue(Container, Allocator) -> queue<typename Container::value_type, Container>; // C++17 +template<class InputIterator, class Allocator> + queue(InputIterator, InputIterator, Allocator) + -> queue<iter-value-type<InputIterator>, + deque<iter-value-type<InputIterator>, Allocator>>; // since C++23 + template <class T, class Container> bool operator==(const queue<T, Container>& x,const queue<T, Container>& y); @@ -206,13 +218,16 @@ template <class T, class Container, class Compare> */ #include <__config> +#include <__iterator/iterator_traits.h> #include <__memory/uses_allocator.h> #include <__utility/forward.h> #include <algorithm> #include <compare> #include <deque> #include <functional> +#include <type_traits> #include <vector> +#include <version> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -255,6 +270,20 @@ public: _LIBCPP_INLINE_VISIBILITY queue(const queue& __q) : c(__q.c) {} +#if _LIBCPP_STD_VER > 20 + template <class _InputIterator, + class = __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>> + _LIBCPP_HIDE_FROM_ABI + queue(_InputIterator __first, _InputIterator __last) : c(__first, __last) {} + + template <class _InputIterator, + class _Alloc, + class = __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>, + class = __enable_if_t<uses_allocator<container_type, _Alloc>::value>> + _LIBCPP_HIDE_FROM_ABI + queue(_InputIterator __first, _InputIterator __second, const _Alloc& __alloc) : c(__first, __second, __alloc) {} +#endif + _LIBCPP_INLINE_VISIBILITY queue& operator=(const queue& __q) {c = __q.c; return *this;} @@ -358,7 +387,7 @@ public: operator< (const queue<_T1, _C1>& __x,const queue<_T1, _C1>& __y); }; -#if _LIBCPP_STD_VER >= 17 +#if _LIBCPP_STD_VER > 14 template<class _Container, class = enable_if_t<!__is_allocator<_Container>::value> > @@ -374,6 +403,20 @@ queue(_Container, _Alloc) -> queue<typename _Container::value_type, _Container>; #endif +#if _LIBCPP_STD_VER > 20 +template <class _InputIterator, + class = __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>> +queue(_InputIterator, _InputIterator) + -> queue<__iter_value_type<_InputIterator>>; + +template <class _InputIterator, + class _Alloc, + class = __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>, + class = __enable_if_t<__is_allocator<_Alloc>::value>> +queue(_InputIterator, _InputIterator, _Alloc) + -> queue<__iter_value_type<_InputIterator>, deque<__iter_value_type<_InputIterator>, _Alloc>>; +#endif + template <class _Tp, class _Container> inline _LIBCPP_INLINE_VISIBILITY bool |