2 //===--------------------------- queue ------------------------------------===//
4 // The LLVM Compiler Infrastructure
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
20 template <class T, class Container = deque<T>>
24 typedef Container container_type;
25 typedef typename container_type::value_type value_type;
26 typedef typename container_type::reference reference;
27 typedef typename container_type::const_reference const_reference;
28 typedef typename container_type::size_type size_type;
37 queue(const queue& q) = default;
38 queue(queue&& q) = default;
40 queue& operator=(const queue& q) = default;
41 queue& operator=(queue&& q) = default;
43 explicit queue(const container_type& c);
44 explicit queue(container_type&& c)
45 template <class Alloc>
46 explicit queue(const Alloc& a);
47 template <class Alloc>
48 queue(const container_type& c, const Alloc& a);
49 template <class Alloc>
50 queue(container_type&& c, const Alloc& a);
51 template <class Alloc>
52 queue(const queue& q, const Alloc& a);
53 template <class Alloc>
54 queue(queue&& q, const Alloc& a);
57 size_type size() const;
60 const_reference front() const;
62 const_reference back() const;
64 void push(const value_type& v);
65 void push(value_type&& v);
66 template <class... Args> reference emplace(Args&&... args); // reference in C++17
69 void swap(queue& q) noexcept(is_nothrow_swappable_v<Container>)
72 template <class T, class Container>
73 bool operator==(const queue<T, Container>& x,const queue<T, Container>& y);
75 template <class T, class Container>
76 bool operator< (const queue<T, Container>& x,const queue<T, Container>& y);
78 template <class T, class Container>
79 bool operator!=(const queue<T, Container>& x,const queue<T, Container>& y);
81 template <class T, class Container>
82 bool operator> (const queue<T, Container>& x,const queue<T, Container>& y);
84 template <class T, class Container>
85 bool operator>=(const queue<T, Container>& x,const queue<T, Container>& y);
87 template <class T, class Container>
88 bool operator<=(const queue<T, Container>& x,const queue<T, Container>& y);
90 template <class T, class Container>
91 void swap(queue<T, Container>& x, queue<T, Container>& y)
92 noexcept(noexcept(x.swap(y)));
94 template <class T, class Container = vector<T>,
95 class Compare = less<typename Container::value_type>>
99 typedef Container container_type;
100 typedef typename container_type::value_type value_type;
101 typedef typename container_type::reference reference;
102 typedef typename container_type::const_reference const_reference;
103 typedef typename container_type::size_type size_type;
110 priority_queue() = default;
111 ~priority_queue() = default;
113 priority_queue(const priority_queue& q) = default;
114 priority_queue(priority_queue&& q) = default;
116 priority_queue& operator=(const priority_queue& q) = default;
117 priority_queue& operator=(priority_queue&& q) = default;
119 explicit priority_queue(const Compare& comp);
120 priority_queue(const Compare& comp, const container_type& c);
121 explicit priority_queue(const Compare& comp, container_type&& c);
122 template <class InputIterator>
123 priority_queue(InputIterator first, InputIterator last,
124 const Compare& comp = Compare());
125 template <class InputIterator>
126 priority_queue(InputIterator first, InputIterator last,
127 const Compare& comp, const container_type& c);
128 template <class InputIterator>
129 priority_queue(InputIterator first, InputIterator last,
130 const Compare& comp, container_type&& c);
131 template <class Alloc>
132 explicit priority_queue(const Alloc& a);
133 template <class Alloc>
134 priority_queue(const Compare& comp, const Alloc& a);
135 template <class Alloc>
136 priority_queue(const Compare& comp, const container_type& c,
138 template <class Alloc>
139 priority_queue(const Compare& comp, container_type&& c,
141 template <class Alloc>
142 priority_queue(const priority_queue& q, const Alloc& a);
143 template <class Alloc>
144 priority_queue(priority_queue&& q, const Alloc& a);
147 size_type size() const;
148 const_reference top() const;
150 void push(const value_type& v);
151 void push(value_type&& v);
152 template <class... Args> void emplace(Args&&... args);
155 void swap(priority_queue& q)
156 noexcept(is_nothrow_swappable_v<Container> &&
157 is_nothrow_swappable_v<Comp>)
160 template <class T, class Container, class Compare>
161 void swap(priority_queue<T, Container, Compare>& x,
162 priority_queue<T, Container, Compare>& y)
163 noexcept(noexcept(x.swap(y)));
172 #include <functional>
175 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
176 #pragma GCC system_header
179 _LIBCPP_BEGIN_NAMESPACE_STD
181 template <class _Tp, class _Container = deque<_Tp> > class _LIBCPP_TEMPLATE_VIS queue;
183 template <class _Tp, class _Container>
184 _LIBCPP_INLINE_VISIBILITY
186 operator==(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y);
188 template <class _Tp, class _Container>
189 _LIBCPP_INLINE_VISIBILITY
191 operator< (const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y);
193 template <class _Tp, class _Container /*= deque<_Tp>*/>
194 class _LIBCPP_TEMPLATE_VIS queue
197 typedef _Container container_type;
198 typedef typename container_type::value_type value_type;
199 typedef typename container_type::reference reference;
200 typedef typename container_type::const_reference const_reference;
201 typedef typename container_type::size_type size_type;
202 static_assert((is_same<_Tp, value_type>::value), "" );
208 _LIBCPP_INLINE_VISIBILITY
210 _NOEXCEPT_(is_nothrow_default_constructible<container_type>::value)
213 _LIBCPP_INLINE_VISIBILITY
214 queue(const queue& __q) : c(__q.c) {}
216 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
217 _LIBCPP_INLINE_VISIBILITY
219 _NOEXCEPT_(is_nothrow_move_constructible<container_type>::value)
220 : c(_VSTD::move(__q.c)) {}
221 #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
223 _LIBCPP_INLINE_VISIBILITY
224 queue& operator=(const queue& __q) {c = __q.c; return *this;}
226 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
227 _LIBCPP_INLINE_VISIBILITY
228 queue& operator=(queue&& __q)
229 _NOEXCEPT_(is_nothrow_move_assignable<container_type>::value)
230 {c = _VSTD::move(__q.c); return *this;}
231 #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
233 _LIBCPP_INLINE_VISIBILITY
234 explicit queue(const container_type& __c) : c(__c) {}
235 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
236 _LIBCPP_INLINE_VISIBILITY
237 explicit queue(container_type&& __c) : c(_VSTD::move(__c)) {}
238 #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
239 template <class _Alloc>
240 _LIBCPP_INLINE_VISIBILITY
241 explicit queue(const _Alloc& __a,
242 typename enable_if<uses_allocator<container_type,
243 _Alloc>::value>::type* = 0)
245 template <class _Alloc>
246 _LIBCPP_INLINE_VISIBILITY
247 queue(const queue& __q, const _Alloc& __a,
248 typename enable_if<uses_allocator<container_type,
249 _Alloc>::value>::type* = 0)
251 template <class _Alloc>
252 _LIBCPP_INLINE_VISIBILITY
253 queue(const container_type& __c, const _Alloc& __a,
254 typename enable_if<uses_allocator<container_type,
255 _Alloc>::value>::type* = 0)
257 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
258 template <class _Alloc>
259 _LIBCPP_INLINE_VISIBILITY
260 queue(container_type&& __c, const _Alloc& __a,
261 typename enable_if<uses_allocator<container_type,
262 _Alloc>::value>::type* = 0)
263 : c(_VSTD::move(__c), __a) {}
264 template <class _Alloc>
265 _LIBCPP_INLINE_VISIBILITY
266 queue(queue&& __q, const _Alloc& __a,
267 typename enable_if<uses_allocator<container_type,
268 _Alloc>::value>::type* = 0)
269 : c(_VSTD::move(__q.c), __a) {}
271 #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
273 _LIBCPP_INLINE_VISIBILITY
274 bool empty() const {return c.empty();}
275 _LIBCPP_INLINE_VISIBILITY
276 size_type size() const {return c.size();}
278 _LIBCPP_INLINE_VISIBILITY
279 reference front() {return c.front();}
280 _LIBCPP_INLINE_VISIBILITY
281 const_reference front() const {return c.front();}
282 _LIBCPP_INLINE_VISIBILITY
283 reference back() {return c.back();}
284 _LIBCPP_INLINE_VISIBILITY
285 const_reference back() const {return c.back();}
287 _LIBCPP_INLINE_VISIBILITY
288 void push(const value_type& __v) {c.push_back(__v);}
289 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
290 _LIBCPP_INLINE_VISIBILITY
291 void push(value_type&& __v) {c.push_back(_VSTD::move(__v));}
292 #ifndef _LIBCPP_HAS_NO_VARIADICS
293 template <class... _Args>
294 _LIBCPP_INLINE_VISIBILITY
295 #if _LIBCPP_STD_VER > 14
296 reference emplace(_Args&&... __args)
297 { return c.emplace_back(_VSTD::forward<_Args>(__args)...);}
299 void emplace(_Args&&... __args)
300 { c.emplace_back(_VSTD::forward<_Args>(__args)...);}
302 #endif // _LIBCPP_HAS_NO_VARIADICS
303 #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
304 _LIBCPP_INLINE_VISIBILITY
305 void pop() {c.pop_front();}
307 _LIBCPP_INLINE_VISIBILITY
308 void swap(queue& __q)
309 _NOEXCEPT_(__is_nothrow_swappable<container_type>::value)
315 template <class _T1, class _C1>
317 _LIBCPP_INLINE_VISIBILITY
319 operator==(const queue<_T1, _C1>& __x,const queue<_T1, _C1>& __y);
321 template <class _T1, class _C1>
323 _LIBCPP_INLINE_VISIBILITY
325 operator< (const queue<_T1, _C1>& __x,const queue<_T1, _C1>& __y);
328 template <class _Tp, class _Container>
329 inline _LIBCPP_INLINE_VISIBILITY
331 operator==(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
333 return __x.c == __y.c;
336 template <class _Tp, class _Container>
337 inline _LIBCPP_INLINE_VISIBILITY
339 operator< (const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
341 return __x.c < __y.c;
344 template <class _Tp, class _Container>
345 inline _LIBCPP_INLINE_VISIBILITY
347 operator!=(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
349 return !(__x == __y);
352 template <class _Tp, class _Container>
353 inline _LIBCPP_INLINE_VISIBILITY
355 operator> (const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
360 template <class _Tp, class _Container>
361 inline _LIBCPP_INLINE_VISIBILITY
363 operator>=(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
368 template <class _Tp, class _Container>
369 inline _LIBCPP_INLINE_VISIBILITY
371 operator<=(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
376 template <class _Tp, class _Container>
377 inline _LIBCPP_INLINE_VISIBILITY
379 __is_swappable<_Container>::value,
382 swap(queue<_Tp, _Container>& __x, queue<_Tp, _Container>& __y)
383 _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
388 template <class _Tp, class _Container, class _Alloc>
389 struct _LIBCPP_TEMPLATE_VIS uses_allocator<queue<_Tp, _Container>, _Alloc>
390 : public uses_allocator<_Container, _Alloc>
394 template <class _Tp, class _Container = vector<_Tp>,
395 class _Compare = less<typename _Container::value_type> >
396 class _LIBCPP_TEMPLATE_VIS priority_queue
399 typedef _Container container_type;
400 typedef _Compare value_compare;
401 typedef typename container_type::value_type value_type;
402 typedef typename container_type::reference reference;
403 typedef typename container_type::const_reference const_reference;
404 typedef typename container_type::size_type size_type;
405 static_assert((is_same<_Tp, value_type>::value), "" );
412 _LIBCPP_INLINE_VISIBILITY
414 _NOEXCEPT_(is_nothrow_default_constructible<container_type>::value &&
415 is_nothrow_default_constructible<value_compare>::value)
418 _LIBCPP_INLINE_VISIBILITY
419 priority_queue(const priority_queue& __q) : c(__q.c), comp(__q.comp) {}
421 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
422 _LIBCPP_INLINE_VISIBILITY
423 priority_queue(priority_queue&& __q)
424 _NOEXCEPT_(is_nothrow_move_constructible<container_type>::value &&
425 is_nothrow_move_constructible<value_compare>::value)
426 : c(_VSTD::move(__q.c)), comp(_VSTD::move(__q.comp)) {}
427 #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
429 _LIBCPP_INLINE_VISIBILITY
430 priority_queue& operator=(const priority_queue& __q)
431 {c = __q.c; comp = __q.comp; return *this;}
433 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
434 _LIBCPP_INLINE_VISIBILITY
435 priority_queue& operator=(priority_queue&& __q)
436 _NOEXCEPT_(is_nothrow_move_assignable<container_type>::value &&
437 is_nothrow_move_assignable<value_compare>::value)
438 {c = _VSTD::move(__q.c); comp = _VSTD::move(__q.comp); return *this;}
439 #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
441 _LIBCPP_INLINE_VISIBILITY
442 explicit priority_queue(const value_compare& __comp)
443 : c(), comp(__comp) {}
444 _LIBCPP_INLINE_VISIBILITY
445 priority_queue(const value_compare& __comp, const container_type& __c);
446 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
447 _LIBCPP_INLINE_VISIBILITY
448 explicit priority_queue(const value_compare& __comp, container_type&& __c);
450 template <class _InputIter>
451 _LIBCPP_INLINE_VISIBILITY
452 priority_queue(_InputIter __f, _InputIter __l,
453 const value_compare& __comp = value_compare());
454 template <class _InputIter>
455 _LIBCPP_INLINE_VISIBILITY
456 priority_queue(_InputIter __f, _InputIter __l,
457 const value_compare& __comp, const container_type& __c);
458 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
459 template <class _InputIter>
460 _LIBCPP_INLINE_VISIBILITY
461 priority_queue(_InputIter __f, _InputIter __l,
462 const value_compare& __comp, container_type&& __c);
463 #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
464 template <class _Alloc>
465 _LIBCPP_INLINE_VISIBILITY
466 explicit priority_queue(const _Alloc& __a,
467 typename enable_if<uses_allocator<container_type,
468 _Alloc>::value>::type* = 0);
469 template <class _Alloc>
470 _LIBCPP_INLINE_VISIBILITY
471 priority_queue(const value_compare& __comp, const _Alloc& __a,
472 typename enable_if<uses_allocator<container_type,
473 _Alloc>::value>::type* = 0);
474 template <class _Alloc>
475 _LIBCPP_INLINE_VISIBILITY
476 priority_queue(const value_compare& __comp, const container_type& __c,
478 typename enable_if<uses_allocator<container_type,
479 _Alloc>::value>::type* = 0);
480 template <class _Alloc>
481 _LIBCPP_INLINE_VISIBILITY
482 priority_queue(const priority_queue& __q, const _Alloc& __a,
483 typename enable_if<uses_allocator<container_type,
484 _Alloc>::value>::type* = 0);
485 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
486 template <class _Alloc>
487 _LIBCPP_INLINE_VISIBILITY
488 priority_queue(const value_compare& __comp, container_type&& __c,
490 typename enable_if<uses_allocator<container_type,
491 _Alloc>::value>::type* = 0);
492 template <class _Alloc>
493 _LIBCPP_INLINE_VISIBILITY
494 priority_queue(priority_queue&& __q, const _Alloc& __a,
495 typename enable_if<uses_allocator<container_type,
496 _Alloc>::value>::type* = 0);
497 #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
499 _LIBCPP_INLINE_VISIBILITY
500 bool empty() const {return c.empty();}
501 _LIBCPP_INLINE_VISIBILITY
502 size_type size() const {return c.size();}
503 _LIBCPP_INLINE_VISIBILITY
504 const_reference top() const {return c.front();}
506 _LIBCPP_INLINE_VISIBILITY
507 void push(const value_type& __v);
508 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
509 _LIBCPP_INLINE_VISIBILITY
510 void push(value_type&& __v);
511 #ifndef _LIBCPP_HAS_NO_VARIADICS
512 template <class... _Args> _LIBCPP_INLINE_VISIBILITY void emplace(_Args&&... __args);
514 #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
515 _LIBCPP_INLINE_VISIBILITY
518 _LIBCPP_INLINE_VISIBILITY
519 void swap(priority_queue& __q)
520 _NOEXCEPT_(__is_nothrow_swappable<container_type>::value &&
521 __is_nothrow_swappable<value_compare>::value);
524 template <class _Tp, class _Container, class _Compare>
526 priority_queue<_Tp, _Container, _Compare>::priority_queue(const _Compare& __comp,
527 const container_type& __c)
531 _VSTD::make_heap(c.begin(), c.end(), comp);
534 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
536 template <class _Tp, class _Container, class _Compare>
538 priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp,
539 container_type&& __c)
540 : c(_VSTD::move(__c)),
543 _VSTD::make_heap(c.begin(), c.end(), comp);
546 #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
548 template <class _Tp, class _Container, class _Compare>
549 template <class _InputIter>
551 priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _InputIter __l,
552 const value_compare& __comp)
556 _VSTD::make_heap(c.begin(), c.end(), comp);
559 template <class _Tp, class _Container, class _Compare>
560 template <class _InputIter>
562 priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _InputIter __l,
563 const value_compare& __comp,
564 const container_type& __c)
568 c.insert(c.end(), __f, __l);
569 _VSTD::make_heap(c.begin(), c.end(), comp);
572 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
574 template <class _Tp, class _Container, class _Compare>
575 template <class _InputIter>
577 priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _InputIter __l,
578 const value_compare& __comp,
579 container_type&& __c)
580 : c(_VSTD::move(__c)),
583 c.insert(c.end(), __f, __l);
584 _VSTD::make_heap(c.begin(), c.end(), comp);
587 #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
589 template <class _Tp, class _Container, class _Compare>
590 template <class _Alloc>
592 priority_queue<_Tp, _Container, _Compare>::priority_queue(const _Alloc& __a,
593 typename enable_if<uses_allocator<container_type,
594 _Alloc>::value>::type*)
599 template <class _Tp, class _Container, class _Compare>
600 template <class _Alloc>
602 priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp,
604 typename enable_if<uses_allocator<container_type,
605 _Alloc>::value>::type*)
611 template <class _Tp, class _Container, class _Compare>
612 template <class _Alloc>
614 priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp,
615 const container_type& __c,
617 typename enable_if<uses_allocator<container_type,
618 _Alloc>::value>::type*)
622 _VSTD::make_heap(c.begin(), c.end(), comp);
625 template <class _Tp, class _Container, class _Compare>
626 template <class _Alloc>
628 priority_queue<_Tp, _Container, _Compare>::priority_queue(const priority_queue& __q,
630 typename enable_if<uses_allocator<container_type,
631 _Alloc>::value>::type*)
635 _VSTD::make_heap(c.begin(), c.end(), comp);
638 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
640 template <class _Tp, class _Container, class _Compare>
641 template <class _Alloc>
643 priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp,
644 container_type&& __c,
646 typename enable_if<uses_allocator<container_type,
647 _Alloc>::value>::type*)
648 : c(_VSTD::move(__c), __a),
651 _VSTD::make_heap(c.begin(), c.end(), comp);
654 template <class _Tp, class _Container, class _Compare>
655 template <class _Alloc>
657 priority_queue<_Tp, _Container, _Compare>::priority_queue(priority_queue&& __q,
659 typename enable_if<uses_allocator<container_type,
660 _Alloc>::value>::type*)
661 : c(_VSTD::move(__q.c), __a),
662 comp(_VSTD::move(__q.comp))
664 _VSTD::make_heap(c.begin(), c.end(), comp);
667 #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
669 template <class _Tp, class _Container, class _Compare>
672 priority_queue<_Tp, _Container, _Compare>::push(const value_type& __v)
675 _VSTD::push_heap(c.begin(), c.end(), comp);
678 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
680 template <class _Tp, class _Container, class _Compare>
683 priority_queue<_Tp, _Container, _Compare>::push(value_type&& __v)
685 c.push_back(_VSTD::move(__v));
686 _VSTD::push_heap(c.begin(), c.end(), comp);
689 #ifndef _LIBCPP_HAS_NO_VARIADICS
691 template <class _Tp, class _Container, class _Compare>
692 template <class... _Args>
695 priority_queue<_Tp, _Container, _Compare>::emplace(_Args&&... __args)
697 c.emplace_back(_VSTD::forward<_Args>(__args)...);
698 _VSTD::push_heap(c.begin(), c.end(), comp);
701 #endif // _LIBCPP_HAS_NO_VARIADICS
702 #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
704 template <class _Tp, class _Container, class _Compare>
707 priority_queue<_Tp, _Container, _Compare>::pop()
709 _VSTD::pop_heap(c.begin(), c.end(), comp);
713 template <class _Tp, class _Container, class _Compare>
716 priority_queue<_Tp, _Container, _Compare>::swap(priority_queue& __q)
717 _NOEXCEPT_(__is_nothrow_swappable<container_type>::value &&
718 __is_nothrow_swappable<value_compare>::value)
722 swap(comp, __q.comp);
725 template <class _Tp, class _Container, class _Compare>
726 inline _LIBCPP_INLINE_VISIBILITY
728 __is_swappable<_Container>::value
729 && __is_swappable<_Compare>::value,
732 swap(priority_queue<_Tp, _Container, _Compare>& __x,
733 priority_queue<_Tp, _Container, _Compare>& __y)
734 _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
739 template <class _Tp, class _Container, class _Compare, class _Alloc>
740 struct _LIBCPP_TEMPLATE_VIS uses_allocator<priority_queue<_Tp, _Container, _Compare>, _Alloc>
741 : public uses_allocator<_Container, _Alloc>
745 _LIBCPP_END_NAMESPACE_STD
747 #endif // _LIBCPP_QUEUE