blob: f5e8d264a571b25763fec3e22a8c7d66ebe8aee3 [file] [log] [blame]
Howard Hinnantbc8d3f92010-05-11 19:42:16 +00001// -*- C++ -*-
2//===--------------------------- queue ------------------------------------===//
3//
Howard Hinnantf5256e12010-05-11 21:36:01 +00004// The LLVM Compiler Infrastructure
Howard Hinnantbc8d3f92010-05-11 19:42:16 +00005//
6// This file is distributed under the University of Illinois Open Source
7// License. See LICENSE.TXT for details.
8//
9//===----------------------------------------------------------------------===//
10
11#ifndef _LIBCPP_QUEUE
12#define _LIBCPP_QUEUE
13
14/*
15 queue synopsis
16
17namespace std
18{
19
20template <class T, class Container = deque<T>>
21class queue
22{
23public:
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;
29
30protected:
31 container_type c;
32
33public:
34 queue();
35 explicit queue(const container_type& c);
36 explicit queue(container_type&& c);
37 queue(queue&& q);
38 template <class Alloc>
39 explicit queue(const Alloc& a);
40 template <class Alloc>
41 queue(const container_type& c, const Alloc& a);
42 template <class Alloc>
43 queue(container_type&& c, const Alloc& a);
44 template <class Alloc>
45 queue(queue&& q, const Alloc& a);
46
47 queue& operator=(queue&& q);
48
49 bool empty() const;
50 size_type size() const;
51
52 reference front();
53 const_reference front() const;
54 reference back();
55 const_reference back() const;
56
57 void push(const value_type& v);
58 void push(value_type&& v);
59 template <class... Args> void emplace(Args&&... args);
60 void pop();
61
62 void swap(queue& q);
63};
64
65template <class T, class Container>
66 bool operator==(const queue<T, Container>& x,const queue<T, Container>& y);
67
68template <class T, class Container>
69 bool operator< (const queue<T, Container>& x,const queue<T, Container>& y);
70
71template <class T, class Container>
72 bool operator!=(const queue<T, Container>& x,const queue<T, Container>& y);
73
74template <class T, class Container>
75 bool operator> (const queue<T, Container>& x,const queue<T, Container>& y);
76
77template <class T, class Container>
78 bool operator>=(const queue<T, Container>& x,const queue<T, Container>& y);
79
80template <class T, class Container>
81 bool operator<=(const queue<T, Container>& x,const queue<T, Container>& y);
82
83template <class T, class Container>
84 void swap(queue<T, Container>& x, queue<T, Container>& y);
85
86template <class T, class Container = vector<T>,
87 class Compare = less<typename Container::value_type>>
88class priority_queue
89{
90public:
91 typedef Container container_type;
92 typedef typename container_type::value_type value_type;
93 typedef typename container_type::reference reference;
94 typedef typename container_type::const_reference const_reference;
95 typedef typename container_type::size_type size_type;
96
97protected:
98 container_type c;
99 Compare comp;
100
101public:
102 explicit priority_queue(const Compare& comp = Compare());
103 priority_queue(const Compare& comp, const container_type& c);
104 explicit priority_queue(const Compare& comp, container_type&& c);
105 template <class InputIterator>
106 priority_queue(InputIterator first, InputIterator last,
107 const Compare& comp = Compare());
108 template <class InputIterator>
109 priority_queue(InputIterator first, InputIterator last,
110 const Compare& comp, const container_type& c);
111 template <class InputIterator>
112 priority_queue(InputIterator first, InputIterator last,
113 const Compare& comp, container_type&& c);
114 priority_queue(priority_queue&& q);
115 priority_queue& operator=(priority_queue&& q);
116 template <class Alloc>
117 explicit priority_queue(const Alloc& a);
118 template <class Alloc>
119 priority_queue(const Compare& comp, const Alloc& a);
120 template <class Alloc>
121 priority_queue(const Compare& comp, const container_type& c,
122 const Alloc& a);
123 template <class Alloc>
124 priority_queue(const Compare& comp, container_type&& c,
125 const Alloc& a);
126 template <class Alloc>
127 priority_queue(priority_queue&& q, const Alloc& a);
128
129 bool empty() const;
130 size_type size() const;
131 const_reference top() const;
132
133 void push(const value_type& v);
134 void push(value_type&& v);
135 template <class... Args> void emplace(Args&&... args);
136 void pop();
137
138 void swap(priority_queue& q);
139};
140
141template <class T, class Container, class Compare>
142 void swap(priority_queue<T, Container, Compare>& x,
143 priority_queue<T, Container, Compare>& y);
144
145} // std
146
147*/
148
149#include <__config>
150#include <deque>
151#include <vector>
152#include <functional>
153#include <algorithm>
154
155#pragma GCC system_header
156
157_LIBCPP_BEGIN_NAMESPACE_STD
158
159template <class _Tp, class _Container> class queue;
160
161template <class _Tp, class _Container>
162bool
163operator==(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y);
164
165template <class _Tp, class _Container>
166bool
167operator< (const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y);
168
169template <class _Tp, class _Container = deque<_Tp> >
170class queue
171{
172public:
173 typedef _Container container_type;
174 typedef typename container_type::value_type value_type;
175 typedef typename container_type::reference reference;
176 typedef typename container_type::const_reference const_reference;
177 typedef typename container_type::size_type size_type;
178
179protected:
180 container_type c;
181
182public:
183 queue() : c() {}
184 explicit queue(const container_type& __c) : c(__c) {}
Howard Hinnant73d21a42010-09-04 23:28:19 +0000185#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000186 explicit queue(container_type&& __c) : c(_STD::move(__c)) {}
187 queue(queue&& __q) : c(_STD::move(__q.c)) {}
Howard Hinnant73d21a42010-09-04 23:28:19 +0000188#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000189 template <class _Alloc>
190 explicit queue(const _Alloc& __a,
191 typename enable_if<uses_allocator<container_type,
192 _Alloc>::value>::type* = 0)
193 : c(__a) {}
194 template <class _Alloc>
195 queue(const queue& __q, const _Alloc& __a,
196 typename enable_if<uses_allocator<container_type,
197 _Alloc>::value>::type* = 0)
198 : c(__q.c, __a) {}
199 template <class _Alloc>
200 queue(const container_type& __c, const _Alloc& __a,
201 typename enable_if<uses_allocator<container_type,
202 _Alloc>::value>::type* = 0)
203 : c(__c, __a) {}
Howard Hinnant73d21a42010-09-04 23:28:19 +0000204#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000205 template <class _Alloc>
206 queue(container_type&& __c, const _Alloc& __a,
207 typename enable_if<uses_allocator<container_type,
208 _Alloc>::value>::type* = 0)
209 : c(_STD::move(__c), __a) {}
210 template <class _Alloc>
211 queue(queue&& __q, const _Alloc& __a,
212 typename enable_if<uses_allocator<container_type,
213 _Alloc>::value>::type* = 0)
214 : c(_STD::move(__q.c), __a) {}
215
216 queue& operator=(queue&& __q)
217 {
218 c = _STD::move(__q.c);
219 return *this;
220 }
Howard Hinnant73d21a42010-09-04 23:28:19 +0000221#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000222
223 bool empty() const {return c.empty();}
224 size_type size() const {return c.size();}
225
226 reference front() {return c.front();}
227 const_reference front() const {return c.front();}
228 reference back() {return c.back();}
229 const_reference back() const {return c.back();}
230
231 void push(const value_type& __v) {c.push_back(__v);}
Howard Hinnant73d21a42010-09-04 23:28:19 +0000232#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000233 void push(value_type&& __v) {c.push_back(_STD::move(__v));}
Howard Hinnant73d21a42010-09-04 23:28:19 +0000234#ifndef _LIBCPP_HAS_NO_VARIADICS
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000235 template <class... _Args>
236 void emplace(_Args&&... __args)
237 {c.emplace_back(_STD::forward<_Args>(__args)...);}
Howard Hinnant73d21a42010-09-04 23:28:19 +0000238#endif // _LIBCPP_HAS_NO_VARIADICS
239#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000240 void pop() {c.pop_front();}
241
242 void swap(queue& __q)
243 {
244 using _STD::swap;
245 swap(c, __q.c);
246 }
247
248 template <class _T1, class _C1>
249 friend
250 bool
251 operator==(const queue<_T1, _C1>& __x,const queue<_T1, _C1>& __y);
Howard Hinnant324bb032010-08-22 00:02:43 +0000252
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000253 template <class _T1, class _C1>
254 friend
255 bool
256 operator< (const queue<_T1, _C1>& __x,const queue<_T1, _C1>& __y);
257};
258
259template <class _Tp, class _Container>
260inline
261bool
262operator==(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
263{
264 return __x.c == __y.c;
265}
266
267template <class _Tp, class _Container>
268inline
269bool
270operator< (const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
271{
272 return __x.c < __y.c;
273}
274
275template <class _Tp, class _Container>
276inline
277bool
278operator!=(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
279{
280 return !(__x == __y);
281}
282
283template <class _Tp, class _Container>
284inline
285bool
286operator> (const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
287{
288 return __y < __x;
289}
290
291template <class _Tp, class _Container>
292inline
293bool
294operator>=(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
295{
296 return !(__x < __y);
297}
298
299template <class _Tp, class _Container>
300inline
301bool
302operator<=(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
303{
304 return !(__y < __x);
305}
306
307template <class _Tp, class _Container>
308inline
309void
310swap(queue<_Tp, _Container>& __x, queue<_Tp, _Container>& __y)
311{
312 __x.swap(__y);
313}
314
315template <class _Tp, class _Container, class _Alloc>
316struct uses_allocator<queue<_Tp, _Container>, _Alloc>
317 : public uses_allocator<_Container, _Alloc>
318{
319};
320
321template <class _Tp, class _Container = vector<_Tp>,
322 class _Compare = less<typename _Container::value_type> >
323class priority_queue
324{
325public:
326 typedef _Container container_type;
327 typedef _Compare value_compare;
328 typedef typename container_type::value_type value_type;
329 typedef typename container_type::reference reference;
330 typedef typename container_type::const_reference const_reference;
331 typedef typename container_type::size_type size_type;
332
333protected:
334 container_type c;
335 value_compare comp;
336
337public:
338 explicit priority_queue(const value_compare& __comp = value_compare())
339 : c(), comp(__comp) {}
340 priority_queue(const value_compare& __comp, const container_type& __c);
Howard Hinnant73d21a42010-09-04 23:28:19 +0000341#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000342 explicit priority_queue(const value_compare& __comp, container_type&& __c);
343#endif
344 template <class _InputIter>
345 priority_queue(_InputIter __f, _InputIter __l,
346 const value_compare& __comp = value_compare());
347 template <class _InputIter>
348 priority_queue(_InputIter __f, _InputIter __l,
349 const value_compare& __comp, const container_type& __c);
Howard Hinnant73d21a42010-09-04 23:28:19 +0000350#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000351 template <class _InputIter>
352 priority_queue(_InputIter __f, _InputIter __l,
353 const value_compare& __comp, container_type&& __c);
354 priority_queue(priority_queue&& __q);
355 priority_queue& operator=(priority_queue&& __q);
Howard Hinnant73d21a42010-09-04 23:28:19 +0000356#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000357 template <class _Alloc>
358 explicit priority_queue(const _Alloc& __a,
359 typename enable_if<uses_allocator<container_type,
360 _Alloc>::value>::type* = 0);
361 template <class _Alloc>
362 priority_queue(const value_compare& __comp, const _Alloc& __a,
363 typename enable_if<uses_allocator<container_type,
364 _Alloc>::value>::type* = 0);
365 template <class _Alloc>
366 priority_queue(const value_compare& __comp, const container_type& __c,
367 const _Alloc& __a,
368 typename enable_if<uses_allocator<container_type,
369 _Alloc>::value>::type* = 0);
370 template <class _Alloc>
371 priority_queue(const priority_queue& __q, const _Alloc& __a,
372 typename enable_if<uses_allocator<container_type,
373 _Alloc>::value>::type* = 0);
Howard Hinnant73d21a42010-09-04 23:28:19 +0000374#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000375 template <class _Alloc>
376 priority_queue(const value_compare& __comp, container_type&& __c,
377 const _Alloc& __a,
378 typename enable_if<uses_allocator<container_type,
379 _Alloc>::value>::type* = 0);
380 template <class _Alloc>
381 priority_queue(priority_queue&& __q, const _Alloc& __a,
382 typename enable_if<uses_allocator<container_type,
383 _Alloc>::value>::type* = 0);
Howard Hinnant73d21a42010-09-04 23:28:19 +0000384#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000385
386 bool empty() const {return c.empty();}
387 size_type size() const {return c.size();}
388 const_reference top() const {return c.front();}
389
390 void push(const value_type& __v);
Howard Hinnant73d21a42010-09-04 23:28:19 +0000391#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000392 void push(value_type&& __v);
Howard Hinnant73d21a42010-09-04 23:28:19 +0000393#ifndef _LIBCPP_HAS_NO_VARIADICS
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000394 template <class... _Args> void emplace(_Args&&... __args);
Howard Hinnant73d21a42010-09-04 23:28:19 +0000395#endif
396#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000397 void pop();
398
399 void swap(priority_queue& __q);
400};
401
402template <class _Tp, class _Container, class _Compare>
403inline
404priority_queue<_Tp, _Container, _Compare>::priority_queue(const _Compare& __comp,
405 const container_type& __c)
406 : c(__c),
407 comp(__comp)
408{
409 _STD::make_heap(c.begin(), c.end(), comp);
410}
411
Howard Hinnant73d21a42010-09-04 23:28:19 +0000412#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000413
414template <class _Tp, class _Container, class _Compare>
415inline
416priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp,
417 container_type&& __c)
418 : c(_STD::move(__c)),
419 comp(__comp)
420{
421 _STD::make_heap(c.begin(), c.end(), comp);
422}
423
Howard Hinnant73d21a42010-09-04 23:28:19 +0000424#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000425
426template <class _Tp, class _Container, class _Compare>
427template <class _InputIter>
428inline
429priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _InputIter __l,
430 const value_compare& __comp)
431 : c(__f, __l),
432 comp(__comp)
433{
434 _STD::make_heap(c.begin(), c.end(), comp);
435}
436
437template <class _Tp, class _Container, class _Compare>
438template <class _InputIter>
439inline
440priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _InputIter __l,
441 const value_compare& __comp,
442 const container_type& __c)
443 : c(__c),
444 comp(__comp)
445{
446 c.insert(c.end(), __f, __l);
447 _STD::make_heap(c.begin(), c.end(), comp);
448}
449
Howard Hinnant73d21a42010-09-04 23:28:19 +0000450#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000451
452template <class _Tp, class _Container, class _Compare>
453template <class _InputIter>
454inline
455priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _InputIter __l,
456 const value_compare& __comp,
457 container_type&& __c)
458 : c(_STD::move(__c)),
459 comp(__comp)
460{
461 c.insert(c.end(), __f, __l);
462 _STD::make_heap(c.begin(), c.end(), comp);
463}
464
465template <class _Tp, class _Container, class _Compare>
466inline
467priority_queue<_Tp, _Container, _Compare>::priority_queue(priority_queue&& __q)
468 : c(_STD::move(__q.c)),
469 comp(_STD::move(__q.comp))
470{
471}
472
473template <class _Tp, class _Container, class _Compare>
474priority_queue<_Tp, _Container, _Compare>&
475priority_queue<_Tp, _Container, _Compare>::operator=(priority_queue&& __q)
476{
477 c = _STD::move(__q.c);
478 comp = _STD::move(__q.comp);
479 return *this;
480}
481
Howard Hinnant73d21a42010-09-04 23:28:19 +0000482#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000483
484template <class _Tp, class _Container, class _Compare>
485template <class _Alloc>
486inline
487priority_queue<_Tp, _Container, _Compare>::priority_queue(const _Alloc& __a,
488 typename enable_if<uses_allocator<container_type,
489 _Alloc>::value>::type*)
490 : c(__a)
491{
492}
493
494template <class _Tp, class _Container, class _Compare>
495template <class _Alloc>
496inline
497priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp,
498 const _Alloc& __a,
499 typename enable_if<uses_allocator<container_type,
500 _Alloc>::value>::type*)
501 : c(__a),
502 comp(__comp)
503{
504}
505
506template <class _Tp, class _Container, class _Compare>
507template <class _Alloc>
508inline
509priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp,
510 const container_type& __c,
511 const _Alloc& __a,
512 typename enable_if<uses_allocator<container_type,
513 _Alloc>::value>::type*)
514 : c(__c, __a),
515 comp(__comp)
516{
517 _STD::make_heap(c.begin(), c.end(), comp);
518}
519
520template <class _Tp, class _Container, class _Compare>
521template <class _Alloc>
522inline
523priority_queue<_Tp, _Container, _Compare>::priority_queue(const priority_queue& __q,
524 const _Alloc& __a,
525 typename enable_if<uses_allocator<container_type,
526 _Alloc>::value>::type*)
527 : c(__q.c, __a),
528 comp(__q.comp)
529{
530 _STD::make_heap(c.begin(), c.end(), comp);
531}
532
Howard Hinnant73d21a42010-09-04 23:28:19 +0000533#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000534
535template <class _Tp, class _Container, class _Compare>
536template <class _Alloc>
537inline
538priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp,
539 container_type&& __c,
540 const _Alloc& __a,
541 typename enable_if<uses_allocator<container_type,
542 _Alloc>::value>::type*)
543 : c(_STD::move(__c), __a),
544 comp(__comp)
545{
546 _STD::make_heap(c.begin(), c.end(), comp);
547}
548
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000549template <class _Tp, class _Container, class _Compare>
550template <class _Alloc>
551inline
552priority_queue<_Tp, _Container, _Compare>::priority_queue(priority_queue&& __q,
553 const _Alloc& __a,
554 typename enable_if<uses_allocator<container_type,
555 _Alloc>::value>::type*)
556 : c(_STD::move(__q.c), __a),
557 comp(_STD::move(__q.comp))
558{
559 _STD::make_heap(c.begin(), c.end(), comp);
560}
561
Howard Hinnant73d21a42010-09-04 23:28:19 +0000562#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000563
564template <class _Tp, class _Container, class _Compare>
565inline
566void
567priority_queue<_Tp, _Container, _Compare>::push(const value_type& __v)
568{
569 c.push_back(__v);
570 _STD::push_heap(c.begin(), c.end(), comp);
571}
572
Howard Hinnant73d21a42010-09-04 23:28:19 +0000573#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000574
575template <class _Tp, class _Container, class _Compare>
576inline
577void
578priority_queue<_Tp, _Container, _Compare>::push(value_type&& __v)
579{
580 c.push_back(_STD::move(__v));
581 _STD::push_heap(c.begin(), c.end(), comp);
582}
583
Howard Hinnant73d21a42010-09-04 23:28:19 +0000584#ifndef _LIBCPP_HAS_NO_VARIADICS
585
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000586template <class _Tp, class _Container, class _Compare>
587template <class... _Args>
588inline
589void
590priority_queue<_Tp, _Container, _Compare>::emplace(_Args&&... __args)
591{
592 c.emplace_back(_STD::forward<_Args>(__args)...);
593 _STD::push_heap(c.begin(), c.end(), comp);
594}
595
Howard Hinnant73d21a42010-09-04 23:28:19 +0000596#endif // _LIBCPP_HAS_NO_VARIADICS
597#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000598
599template <class _Tp, class _Container, class _Compare>
600inline
601void
602priority_queue<_Tp, _Container, _Compare>::pop()
603{
604 _STD::pop_heap(c.begin(), c.end(), comp);
605 c.pop_back();
606}
607
608template <class _Tp, class _Container, class _Compare>
609inline
610void
611priority_queue<_Tp, _Container, _Compare>::swap(priority_queue& __q)
612{
613 using _STD::swap;
614 swap(c, __q.c);
615 swap(comp, __q.comp);
616}
617
618template <class _Tp, class _Container, class _Compare>
619inline
620void
621swap(priority_queue<_Tp, _Container, _Compare>& __x,
622 priority_queue<_Tp, _Container, _Compare>& __y)
623{
624 __x.swap(__y);
625}
626
627template <class _Tp, class _Container, class _Compare, class _Alloc>
628struct uses_allocator<priority_queue<_Tp, _Container, _Compare>, _Alloc>
629 : public uses_allocator<_Container, _Alloc>
630{
631};
632
633_LIBCPP_END_NAMESPACE_STD
634
635#endif // _LIBCPP_QUEUE