diff options
Diffstat (limited to 'lib/libcxx/include/queue')
| -rw-r--r-- | lib/libcxx/include/queue | 273 |
1 files changed, 224 insertions, 49 deletions
diff --git a/lib/libcxx/include/queue b/lib/libcxx/include/queue index 42470e3a10..9e1257b25e 100644 --- a/lib/libcxx/include/queue +++ b/lib/libcxx/include/queue @@ -1,5 +1,5 @@ // -*- C++ -*- -//===--------------------------- queue ------------------------------------===// +//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -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); @@ -115,27 +127,39 @@ public: priority_queue() : priority_queue(Compare()) {} // C++20 explicit priority_queue(const Compare& x) : priority_queue(x, Container()) {} priority_queue(const Compare& x, const Container&); - explicit priority_queue(const Compare& x = Compare(), Container&&= Container()); // before C++20 + explicit priority_queue(const Compare& x = Compare(), Container&& = Container()); // before C++20 priority_queue(const Compare& x, Container&&); // C++20 template <class InputIterator> priority_queue(InputIterator first, InputIterator last, const Compare& comp = Compare()); template <class InputIterator> priority_queue(InputIterator first, InputIterator last, - const Compare& comp, const container_type& c); + const Compare& comp, const Container& c); template <class InputIterator> priority_queue(InputIterator first, InputIterator last, - const Compare& comp, container_type&& c); + const Compare& comp, Container&& c); template <class Alloc> explicit priority_queue(const Alloc& a); template <class Alloc> priority_queue(const Compare& comp, const Alloc& a); template <class Alloc> - priority_queue(const Compare& comp, const container_type& c, + priority_queue(const Compare& comp, const Container& c, const Alloc& a); template <class Alloc> - priority_queue(const Compare& comp, container_type&& c, + priority_queue(const Compare& comp, Container&& c, const Alloc& a); + template <class InputIterator> + priority_queue(InputIterator first, InputIterator last, + const Alloc& a); + template <class InputIterator> + priority_queue(InputIterator first, InputIterator last, + const Compare& comp, const Alloc& a); + template <class InputIterator> + priority_queue(InputIterator first, InputIterator last, + const Compare& comp, const Container& c, const Alloc& a); + template <class InputIterator> + priority_queue(InputIterator first, InputIterator last, + const Compare& comp, Container&& c, const Alloc& a); template <class Alloc> priority_queue(const priority_queue& q, const Alloc& a); template <class Alloc> @@ -160,15 +184,30 @@ priority_queue(Compare, Container) -> priority_queue<typename Container::value_type, Container, Compare>; // C++17 template<class InputIterator, - class Compare = less<typename iterator_traits<InputIterator>::value_type>, - class Container = vector<typename iterator_traits<InputIterator>::value_type>> + class Compare = less<iter-value-type<InputIterator>>, + class Container = vector<iter-value-type<InputIterator>>> priority_queue(InputIterator, InputIterator, Compare = Compare(), Container = Container()) - -> priority_queue<typename iterator_traits<InputIterator>::value_type, Container, Compare>; // C++17 + -> priority_queue<iter-value-type<InputIterator>, Container, Compare>; // C++17 template<class Compare, class Container, class Allocator> priority_queue(Compare, Container, Allocator) -> priority_queue<typename Container::value_type, Container, Compare>; // C++17 +template<class InputIterator, class Allocator> +priority_queue(InputIterator, InputIterator, Allocator) + -> priority_queue<iter-value-type<InputIterator>, + vector<iter-value-type<InputIterator>, Allocator>, + less<iter-value-type<InputIterator>>>; // C++17 + +template<class InputIterator, class Compare, class Allocator> +priority_queue(InputIterator, InputIterator, Compare, Allocator) + -> priority_queue<iter-value-type<InputIterator>, + vector<iter-value-type<InputIterator>, Allocator>, Compare>; // C++17 + +template<class InputIterator, class Compare, class Container, class Allocator> +priority_queue(InputIterator, InputIterator, Compare, Container, Allocator) + -> priority_queue<typename Container::value_type, Container, Compare>; // C++17 + template <class T, class Container, class Compare> void swap(priority_queue<T, Container, Compare>& x, priority_queue<T, Container, Compare>& y) @@ -179,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 @@ -228,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;} @@ -252,28 +308,28 @@ public: template <class _Alloc> _LIBCPP_INLINE_VISIBILITY explicit queue(const _Alloc& __a, - _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0) + __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0) : c(__a) {} template <class _Alloc> _LIBCPP_INLINE_VISIBILITY queue(const queue& __q, const _Alloc& __a, - _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0) + __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0) : c(__q.c, __a) {} template <class _Alloc> _LIBCPP_INLINE_VISIBILITY queue(const container_type& __c, const _Alloc& __a, - _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0) + __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0) : c(__c, __a) {} #ifndef _LIBCPP_CXX03_LANG template <class _Alloc> _LIBCPP_INLINE_VISIBILITY queue(container_type&& __c, const _Alloc& __a, - _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0) + __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0) : c(_VSTD::move(__c), __a) {} template <class _Alloc> _LIBCPP_INLINE_VISIBILITY queue(queue&& __q, const _Alloc& __a, - _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0) + __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0) : c(_VSTD::move(__q.c), __a) {} #endif // _LIBCPP_CXX03_LANG @@ -331,22 +387,36 @@ public: operator< (const queue<_T1, _C1>& __x,const queue<_T1, _C1>& __y); }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER > 14 template<class _Container, - class = _EnableIf<!__is_allocator<_Container>::value> + class = enable_if_t<!__is_allocator<_Container>::value> > queue(_Container) -> queue<typename _Container::value_type, _Container>; template<class _Container, class _Alloc, - class = _EnableIf<!__is_allocator<_Container>::value>, - class = _EnableIf<uses_allocator<_Container, _Alloc>::value> + class = enable_if_t<!__is_allocator<_Container>::value>, + class = enable_if_t<uses_allocator<_Container, _Alloc>::value> > 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 @@ -397,7 +467,7 @@ operator<=(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y) template <class _Tp, class _Container> inline _LIBCPP_INLINE_VISIBILITY -_EnableIf<__is_swappable<_Container>::value, void> +__enable_if_t<__is_swappable<_Container>::value, void> swap(queue<_Tp, _Container>& __x, queue<_Tp, _Container>& __y) _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) { @@ -464,16 +534,16 @@ public: _LIBCPP_INLINE_VISIBILITY priority_queue(const value_compare& __comp, container_type&& __c); #endif - template <class _InputIter> + template <class _InputIter, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> > _LIBCPP_INLINE_VISIBILITY priority_queue(_InputIter __f, _InputIter __l, const value_compare& __comp = value_compare()); - template <class _InputIter> + template <class _InputIter, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> > _LIBCPP_INLINE_VISIBILITY priority_queue(_InputIter __f, _InputIter __l, const value_compare& __comp, const container_type& __c); #ifndef _LIBCPP_CXX03_LANG - template <class _InputIter> + template <class _InputIter, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> > _LIBCPP_INLINE_VISIBILITY priority_queue(_InputIter __f, _InputIter __l, const value_compare& __comp, container_type&& __c); @@ -481,32 +551,57 @@ public: template <class _Alloc> _LIBCPP_INLINE_VISIBILITY explicit priority_queue(const _Alloc& __a, - _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0); + __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0); template <class _Alloc> _LIBCPP_INLINE_VISIBILITY priority_queue(const value_compare& __comp, const _Alloc& __a, - _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0); + __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0); template <class _Alloc> _LIBCPP_INLINE_VISIBILITY priority_queue(const value_compare& __comp, const container_type& __c, const _Alloc& __a, - _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0); + __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0); template <class _Alloc> _LIBCPP_INLINE_VISIBILITY priority_queue(const priority_queue& __q, const _Alloc& __a, - _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0); + __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0); #ifndef _LIBCPP_CXX03_LANG template <class _Alloc> _LIBCPP_INLINE_VISIBILITY priority_queue(const value_compare& __comp, container_type&& __c, const _Alloc& __a, - _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0); + __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0); template <class _Alloc> _LIBCPP_INLINE_VISIBILITY priority_queue(priority_queue&& __q, const _Alloc& __a, - _EnableIf<uses_allocator<container_type, _Alloc>::value>* = 0); + __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0); #endif // _LIBCPP_CXX03_LANG + template <class _InputIter, class _Alloc, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> > + _LIBCPP_INLINE_VISIBILITY + priority_queue(_InputIter __f, _InputIter __l, const _Alloc& __a, + __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0); + + template <class _InputIter, class _Alloc, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> > + _LIBCPP_INLINE_VISIBILITY + priority_queue(_InputIter __f, _InputIter __l, + const value_compare& __comp, const _Alloc& __a, + __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0); + + template <class _InputIter, class _Alloc, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> > + _LIBCPP_INLINE_VISIBILITY + priority_queue(_InputIter __f, _InputIter __l, + const value_compare& __comp, const container_type& __c, const _Alloc& __a, + __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0); + +#ifndef _LIBCPP_CXX03_LANG + template <class _InputIter, class _Alloc, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> > + _LIBCPP_INLINE_VISIBILITY + priority_queue(_InputIter __f, _InputIter __l, + const value_compare& __comp, container_type&& __c, const _Alloc& __a, + __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0); +#endif // _LIBCPP_CXX03_LANG + _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY bool empty() const {return c.empty();} _LIBCPP_INLINE_VISIBILITY @@ -532,11 +627,11 @@ public: __is_nothrow_swappable<value_compare>::value); }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template <class _Compare, class _Container, - class = _EnableIf<!__is_allocator<_Compare>::value>, - class = _EnableIf<!__is_allocator<_Container>::value> + class = enable_if_t<!__is_allocator<_Compare>::value>, + class = enable_if_t<!__is_allocator<_Container>::value> > priority_queue(_Compare, _Container) -> priority_queue<typename _Container::value_type, _Container, _Compare>; @@ -544,9 +639,9 @@ priority_queue(_Compare, _Container) template<class _InputIterator, class _Compare = less<__iter_value_type<_InputIterator>>, class _Container = vector<__iter_value_type<_InputIterator>>, - class = _EnableIf<__is_cpp17_input_iterator<_InputIterator>::value>, - class = _EnableIf<!__is_allocator<_Compare>::value>, - class = _EnableIf<!__is_allocator<_Container>::value> + class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>, + class = enable_if_t<!__is_allocator<_Compare>::value>, + class = enable_if_t<!__is_allocator<_Container>::value> > priority_queue(_InputIterator, _InputIterator, _Compare = _Compare(), _Container = _Container()) -> priority_queue<__iter_value_type<_InputIterator>, _Container, _Compare>; @@ -554,12 +649,39 @@ priority_queue(_InputIterator, _InputIterator, _Compare = _Compare(), _Container template<class _Compare, class _Container, class _Alloc, - class = _EnableIf<!__is_allocator<_Compare>::value>, - class = _EnableIf<!__is_allocator<_Container>::value>, - class = _EnableIf<uses_allocator<_Container, _Alloc>::value> + class = enable_if_t<!__is_allocator<_Compare>::value>, + class = enable_if_t<!__is_allocator<_Container>::value>, + class = enable_if_t<uses_allocator<_Container, _Alloc>::value> > priority_queue(_Compare, _Container, _Alloc) -> priority_queue<typename _Container::value_type, _Container, _Compare>; + +template<class _InputIterator, class _Allocator, + class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>, + class = enable_if_t<__is_allocator<_Allocator>::value> +> +priority_queue(_InputIterator, _InputIterator, _Allocator) + -> priority_queue<__iter_value_type<_InputIterator>, + vector<__iter_value_type<_InputIterator>, _Allocator>, + less<__iter_value_type<_InputIterator>>>; + +template<class _InputIterator, class _Compare, class _Allocator, + class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>, + class = enable_if_t<!__is_allocator<_Compare>::value>, + class = enable_if_t<__is_allocator<_Allocator>::value> +> +priority_queue(_InputIterator, _InputIterator, _Compare, _Allocator) + -> priority_queue<__iter_value_type<_InputIterator>, + vector<__iter_value_type<_InputIterator>, _Allocator>, _Compare>; + +template<class _InputIterator, class _Compare, class _Container, class _Alloc, + class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>, + class = enable_if_t<!__is_allocator<_Compare>::value>, + class = enable_if_t<!__is_allocator<_Container>::value>, + class = enable_if_t<uses_allocator<_Container, _Alloc>::value> +> +priority_queue(_InputIterator, _InputIterator, _Compare, _Container, _Alloc) + -> priority_queue<typename _Container::value_type, _Container, _Compare>; #endif template <class _Tp, class _Container, class _Compare> @@ -587,7 +709,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& _ #endif // _LIBCPP_CXX03_LANG template <class _Tp, class _Container, class _Compare> -template <class _InputIter> +template <class _InputIter, class> inline priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _InputIter __l, const value_compare& __comp) @@ -598,7 +720,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _Input } template <class _Tp, class _Container, class _Compare> -template <class _InputIter> +template <class _InputIter, class> inline priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _InputIter __l, const value_compare& __comp, @@ -613,7 +735,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _Input #ifndef _LIBCPP_CXX03_LANG template <class _Tp, class _Container, class _Compare> -template <class _InputIter> +template <class _InputIter, class> inline priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _InputIter __l, const value_compare& __comp, @@ -631,7 +753,7 @@ template <class _Tp, class _Container, class _Compare> template <class _Alloc> inline priority_queue<_Tp, _Container, _Compare>::priority_queue(const _Alloc& __a, - _EnableIf<uses_allocator<container_type, _Alloc>::value>*) + __enable_if_t<uses_allocator<container_type, _Alloc>::value>*) : c(__a) { } @@ -641,7 +763,7 @@ template <class _Alloc> inline priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp, const _Alloc& __a, - _EnableIf<uses_allocator<container_type, _Alloc>::value>*) + __enable_if_t<uses_allocator<container_type, _Alloc>::value>*) : c(__a), comp(__comp) { @@ -653,7 +775,7 @@ inline priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp, const container_type& __c, const _Alloc& __a, - _EnableIf<uses_allocator<container_type, _Alloc>::value>*) + __enable_if_t<uses_allocator<container_type, _Alloc>::value>*) : c(__c, __a), comp(__comp) { @@ -665,11 +787,10 @@ template <class _Alloc> inline priority_queue<_Tp, _Container, _Compare>::priority_queue(const priority_queue& __q, const _Alloc& __a, - _EnableIf<uses_allocator<container_type, _Alloc>::value>*) + __enable_if_t<uses_allocator<container_type, _Alloc>::value>*) : c(__q.c, __a), comp(__q.comp) { - _VSTD::make_heap(c.begin(), c.end(), comp); } #ifndef _LIBCPP_CXX03_LANG @@ -680,7 +801,7 @@ inline priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp, container_type&& __c, const _Alloc& __a, - _EnableIf<uses_allocator<container_type, _Alloc>::value>*) + __enable_if_t<uses_allocator<container_type, _Alloc>::value>*) : c(_VSTD::move(__c), __a), comp(__comp) { @@ -692,14 +813,68 @@ template <class _Alloc> inline priority_queue<_Tp, _Container, _Compare>::priority_queue(priority_queue&& __q, const _Alloc& __a, - _EnableIf<uses_allocator<container_type, _Alloc>::value>*) + __enable_if_t<uses_allocator<container_type, _Alloc>::value>*) : c(_VSTD::move(__q.c), __a), comp(_VSTD::move(__q.comp)) { +} + +#endif // _LIBCPP_CXX03_LANG + +template <class _Tp, class _Container, class _Compare> +template <class _InputIter, class _Alloc, class> +inline +priority_queue<_Tp, _Container, _Compare>::priority_queue( + _InputIter __f, _InputIter __l, const _Alloc& __a, + __enable_if_t<uses_allocator<container_type, _Alloc>::value>*) + : c(__f, __l, __a), + comp() +{ _VSTD::make_heap(c.begin(), c.end(), comp); } -#endif // _LIBCPP_CXX03_LANG +template <class _Tp, class _Container, class _Compare> +template <class _InputIter, class _Alloc, class> +inline +priority_queue<_Tp, _Container, _Compare>::priority_queue( + _InputIter __f, _InputIter __l, + const value_compare& __comp, const _Alloc& __a, + __enable_if_t<uses_allocator<container_type, _Alloc>::value>*) + : c(__f, __l, __a), + comp(__comp) +{ + _VSTD::make_heap(c.begin(), c.end(), comp); +} + +template <class _Tp, class _Container, class _Compare> +template <class _InputIter, class _Alloc, class> +inline +priority_queue<_Tp, _Container, _Compare>::priority_queue( + _InputIter __f, _InputIter __l, + const value_compare& __comp, const container_type& __c, const _Alloc& __a, + __enable_if_t<uses_allocator<container_type, _Alloc>::value>*) + : c(__c, __a), + comp(__comp) +{ + c.insert(c.end(), __f, __l); + _VSTD::make_heap(c.begin(), c.end(), comp); +} + +#ifndef _LIBCPP_CXX03_LANG +template <class _Tp, class _Container, class _Compare> +template <class _InputIter, class _Alloc, class> +inline +priority_queue<_Tp, _Container, _Compare>::priority_queue( + _InputIter __f, _InputIter __l, const value_compare& __comp, + container_type&& __c, const _Alloc& __a, + __enable_if_t<uses_allocator<container_type, _Alloc>::value>*) + : c(_VSTD::move(__c), __a), + comp(__comp) +{ + c.insert(c.end(), __f, __l); + _VSTD::make_heap(c.begin(), c.end(), comp); +} +#endif // _LIBCPP_CXX03_LANG template <class _Tp, class _Container, class _Compare> inline @@ -756,7 +931,7 @@ priority_queue<_Tp, _Container, _Compare>::swap(priority_queue& __q) template <class _Tp, class _Container, class _Compare> inline _LIBCPP_INLINE_VISIBILITY -_EnableIf< +__enable_if_t< __is_swappable<_Container>::value && __is_swappable<_Compare>::value, void > |
