BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslstl_queue_cpp03.h
Go to the documentation of this file.
1/// @file bslstl_queue_cpp03.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bslstl_queue_cpp03.h -*-C++-*-
8
9// Automatically generated file. **DO NOT EDIT**
10
11#ifndef INCLUDED_BSLSTL_QUEUE_CPP03
12#define INCLUDED_BSLSTL_QUEUE_CPP03
13
14/// @defgroup bslstl_queue_cpp03 bslstl_queue_cpp03
15/// @brief Provide C++03 implementation for bslstl_queue.h
16/// @addtogroup bsl
17/// @{
18/// @addtogroup bslstl
19/// @{
20/// @addtogroup bslstl_queue_cpp03
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bslstl_queue_cpp03-purpose"> Purpose</a>
25/// * <a href="#bslstl_queue_cpp03-classes"> Classes </a>
26/// * <a href="#bslstl_queue_cpp03-description"> Description </a>
27///
28/// # Purpose {#bslstl_queue_cpp03-purpose}
29/// Provide C++03 implementation for bslstl_queue.h
30///
31/// # Classes {#bslstl_queue_cpp03-classes}
32/// See bslstl_queue.h for list of classes
33///
34/// @see bslstl_queue
35///
36/// # Description {#bslstl_queue_cpp03-description}
37/// This component is the C++03 translation of a C++11 component,
38/// generated by the 'sim_cpp11_features.pl' program. If the original header
39/// contains any specially delimited regions of C++11 code, then this generated
40/// file contains the C++03 equivalent, i.e., with variadic templates expanded
41/// and rvalue-references replaced by 'bslmf::MovableRef' objects. The header
42/// code in this file is designed to be '#include'd into the original header
43/// when compiling with a C++03 compiler. If there are no specially delimited
44/// regions of C++11 code, then this header contains no code and is not
45/// '#include'd in the original header.
46///
47/// Generated on Sun Sep 1 05:39:10 2024
48/// Command line: sim_cpp11_features.pl bslstl_queue.h
49/// @}
50/** @} */
51/** @} */
52
53/** @addtogroup bsl
54 * @{
55 */
56/** @addtogroup bslstl
57 * @{
58 */
59/** @addtogroup bslstl_queue_cpp03
60 * @{
61 */
62
63#ifdef COMPILING_BSLSTL_QUEUE_H
64
65namespace bsl {
66
67 // ===========
68 // class queue
69 // ===========
70
71/// This class is a value-semantic class template, having a container of the
72/// parameterized `CONTAINER` type that holds elements of the parameterized
73/// `VALUE` type, to provide a first-in-first-out queue data structure. The
74/// container object held by a `queue` class object is referenced as `c` in
75/// the following function-level documentation.
76///
77/// See @ref bslstl_queue_cpp03
78template <class VALUE, class CONTAINER = deque<VALUE> >
79class queue {
80
81#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_BASELINE_LIBRARY
82 // STATIC CHECK: Type mismatch is UB per C++17
84#endif
85
86 // FRIENDS
87 template <class VALUE2, class CONTAINER2>
88 friend bool operator==(const queue<VALUE2, CONTAINER2>&,
89 const queue<VALUE2, CONTAINER2>&);
90
91 template <class VALUE2, class CONTAINER2>
92 friend bool operator!=(const queue<VALUE2, CONTAINER2>&,
93 const queue<VALUE2, CONTAINER2>&);
94
95 template <class VALUE2, class CONTAINER2>
96 friend bool operator< (const queue<VALUE2, CONTAINER2>&,
97 const queue<VALUE2, CONTAINER2>&);
98
99 template <class VALUE2, class CONTAINER2>
100 friend bool operator> (const queue<VALUE2, CONTAINER2>&,
101 const queue<VALUE2, CONTAINER2>&);
102
103 template <class VALUE2, class CONTAINER2>
104 friend bool operator<=(const queue<VALUE2, CONTAINER2>&,
105 const queue<VALUE2, CONTAINER2>&);
106
107 template <class VALUE2, class CONTAINER2>
108 friend bool operator>=(const queue<VALUE2, CONTAINER2>&,
109 const queue<VALUE2, CONTAINER2>&);
110
111#if defined BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON \
112 && defined BSLS_LIBRARYFEATURES_HAS_CPP20_CONCEPTS
113 template <class VALUE2, three_way_comparable CONTAINER2>
114 friend compare_three_way_result_t<CONTAINER2>
115 operator<=>(const queue<VALUE2, CONTAINER2>&,
116 const queue<VALUE2, CONTAINER2>&);
117#endif
118
119 // PRIVATE TYPES
120
121 /// This `typedef` is a convenient alias for the utility associated with
122 /// movable references.
123 typedef BloombergLP::bslmf::MovableRefUtil MoveUtil;
124
125 public:
126 // PUBLIC TYPES
127 typedef typename CONTAINER::value_type value_type;
128 typedef typename CONTAINER::reference reference;
129 typedef typename CONTAINER::const_reference const_reference;
130 typedef typename CONTAINER::size_type size_type;
131 typedef CONTAINER container_type;
132
133 protected:
134 // PROTECTED DATA
135 CONTAINER c; // Contains the elements of this queue.
136 // 'protected' and named ('c') per the C++11 standard.
137
138 public:
139 // TRAITS
141 queue,
142 BloombergLP::bslma::UsesBslmaAllocator,
143 BloombergLP::bslma::UsesBslmaAllocator<container_type>::value);
144
145 // CREATORS
146
147 /// Create an empty queue having a container of the parameterized
148 /// `CONTAINER` type.
149 explicit queue();
150
151 /// Create a queue having the value of the specified `original`.
152 queue(const queue& original);
153
154 /// Create a queue having the value of the specified `original`. The
155 /// allocator associated with `original` (if any) is propagated for use
156 /// in the new queue. `original` is left in valid but unspecified
157 /// state.
158 queue(BloombergLP::bslmf::MovableRef<queue> container);
159
160 /// Create a queue having the specified `container` that holds elements
161 /// of the parameterized `VALUE` type.
162 explicit queue(const CONTAINER& container);
163
164 /// Create a queue having the same sequence of values as the specified
165 /// `container`. The allocator associated with `container` (if any) is
166 /// propagated for use in the new queue. `container` is left in valid
167 /// but unspecified state.
168 explicit queue(BloombergLP::bslmf::MovableRef<CONTAINER> container);
169
170 /// Create an empty queue. This queue object uses the specified
171 /// `basicAllocator` to supply memory. Note that the `ALLOCATOR`
172 /// parameter type has to be convertible to the allocator of the
173 /// `CONTAINER` parameter type, `CONTAINER::allocator_type`; otherwise,
174 /// this constructor is disabled.
175 template <class ALLOCATOR>
176 explicit
177 queue(const ALLOCATOR& basicAllocator,
179 ALLOCATOR>::type * = 0);
180
181 /// Create a queue having the same sequence of values as the specified
182 /// `container`. The queue object uses the specified `basicAllocator`
183 /// to obtain memory. Note that the `ALLOCATOR` parameter type has to
184 /// be convertible to the allocator of the `CONTAINER` parameter type,
185 /// `CONTAINER::allocator_type`; otherwise, this constructor is
186 /// disabled.
187 template <class ALLOCATOR>
188 queue(const CONTAINER& container,
189 const ALLOCATOR& basicAllocator,
191 ALLOCATOR>::type * = 0);
192
193 /// Create a queue having the value of the specified `original` that
194 /// will use the specified `basicAllocator` to supply memory. Note that
195 /// the `ALLOCATOR` parameter type has to be convertible to the
196 /// allocator of the `CONTAINER` parameter type,
197 /// `CONTAINER::allocator_type`. Otherwise this constructor is
198 /// disabled.
199 template <class ALLOCATOR>
200 queue(const queue& original,
201 const ALLOCATOR& basicAllocator,
203 ALLOCATOR>::type * = 0);
204
205 /// Create a queue whose underlying container has the value of the
206 /// specified `container` (on entry) and uses `basicAllocator` to supply
207 /// memory. The allocated-extended move constructor of `CONTAINER` is
208 /// used to create the new queue. `container` is left in a valid but
209 /// unspecified state. Note that a `bslma::Allocator *` can be supplied
210 /// for `basicAllocator` if the (template parameter) `ALLOCATOR` is
211 /// `bsl::allocator` (the default). Also note that this method assumes
212 /// that `CONTAINER` has a move constructor. Also note that if
213 /// `CONTAINER::allocator_type` does not exist, this constructor is
214 /// disabled.
215 template <class ALLOCATOR>
216 queue(BloombergLP::bslmf::MovableRef<CONTAINER> container,
217 const ALLOCATOR& basicAllocator,
219 ALLOCATOR>::type * = 0);
220
221 /// Create a queue having the value of the specified `original` (on
222 /// entry), that uses `basicAllocator` to supply memory. The
223 /// allocator-extended move constructor of `CONTAINER` is used to create
224 /// the new queue. `original` is left in a valid but unspecified state.
225 /// Note that a `bslma::Allocator *` can be supplied for
226 /// `basicAllocator` if the (template parameter) `ALLOCATOR` is
227 /// `bsl::allocator` (the default). Also note that this method assumes
228 /// that `CONTAINER` has a move constructor. Also note that if
229 /// `CONTAINER::allocator_type` does not exist, this constructor is
230 /// disabled.
231 template <class ALLOCATOR>
232 queue(BloombergLP::bslmf::MovableRef<queue> original,
233 const ALLOCATOR& basicAllocator,
235 ALLOCATOR>::type * = 0);
236
237 // MANIPULATORS
238
239 /// Assign to this queue the value of the specified `rhs`, and return a
240 /// reference providing modifiable access to this queue.
241 queue& operator=(const queue& rhs);
242
243 /// Assign to this queue the value as the specified `rhs` and return a
244 /// reference providing modifiable access to this queue. The
245 /// move-assignment operator of `CONTAINER` is used to set the value of
246 /// this queue. `rhs` is left in a valid but unspecified state, and if
247 /// an exception is thrown, `*this` is left in a valid but unspecified
248 /// state.
249 queue& operator=(BloombergLP::bslmf::MovableRef<queue> rhs);
250
251#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
252// {{{ BEGIN GENERATED CODE
253// Command line: sim_cpp11_features.pl bslstl_queue.h
254#ifndef BSLSTL_QUEUE_VARIADIC_LIMIT
255#define BSLSTL_QUEUE_VARIADIC_LIMIT 10
256#endif
257#ifndef BSLSTL_QUEUE_VARIADIC_LIMIT_A
258#define BSLSTL_QUEUE_VARIADIC_LIMIT_A BSLSTL_QUEUE_VARIADIC_LIMIT
259#endif
260#if BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 0
262#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 0
263
264#if BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 1
265 template <class Args_01>
267#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 1
268
269#if BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 2
270 template <class Args_01,
271 class Args_02>
273 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02);
274#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 2
275
276#if BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 3
277 template <class Args_01,
278 class Args_02,
279 class Args_03>
281 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
282 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03);
283#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 3
284
285#if BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 4
286 template <class Args_01,
287 class Args_02,
288 class Args_03,
289 class Args_04>
291 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
292 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
293 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04);
294#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 4
295
296#if BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 5
297 template <class Args_01,
298 class Args_02,
299 class Args_03,
300 class Args_04,
301 class Args_05>
303 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
304 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
305 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
306 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05);
307#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 5
308
309#if BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 6
310 template <class Args_01,
311 class Args_02,
312 class Args_03,
313 class Args_04,
314 class Args_05,
315 class Args_06>
317 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
318 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
319 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
320 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
321 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06);
322#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 6
323
324#if BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 7
325 template <class Args_01,
326 class Args_02,
327 class Args_03,
328 class Args_04,
329 class Args_05,
330 class Args_06,
331 class Args_07>
333 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
334 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
335 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
336 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
337 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
338 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07);
339#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 7
340
341#if BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 8
342 template <class Args_01,
343 class Args_02,
344 class Args_03,
345 class Args_04,
346 class Args_05,
347 class Args_06,
348 class Args_07,
349 class Args_08>
351 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
352 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
353 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
354 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
355 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
356 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
357 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08);
358#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 8
359
360#if BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 9
361 template <class Args_01,
362 class Args_02,
363 class Args_03,
364 class Args_04,
365 class Args_05,
366 class Args_06,
367 class Args_07,
368 class Args_08,
369 class Args_09>
371 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
372 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
373 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
374 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
375 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
376 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
377 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
378 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09);
379#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 9
380
381#if BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 10
382 template <class Args_01,
383 class Args_02,
384 class Args_03,
385 class Args_04,
386 class Args_05,
387 class Args_06,
388 class Args_07,
389 class Args_08,
390 class Args_09,
391 class Args_10>
393 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
394 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
395 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
396 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
397 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
398 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
399 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
400 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09,
401 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) args_10);
402#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_A >= 10
403
404#else
405// The generated code below is a workaround for the absence of perfect
406// forwarding in some compilers.
407 template <class... Args>
409
410// }}} END GENERATED CODE
411#endif
412
413 /// Push onto the back of this queue a `value_type` object having the
414 /// specified `value`.
415 void push(const value_type& value);
416
417 /// Push onto the back of this queue a `value_type` object having the
418 /// value of the specified `value` (on entry) by moving the
419 /// contents of `value` to the new object on this queue. `value` is
420 /// left in a valid but unspecified state.
421 void push(BloombergLP::bslmf::MovableRef<value_type> value);
422
423 void pop();
424 /// Remove the front (the earliest pushed) element from this `queue`
425 /// object.
426
428 bsl::is_nothrow_swappable<CONTAINER>::value);
429 // Efficiently exchange the value of this object with the value of the
430 // specified 'other' object. In effect, performs
431 // 'using bsl::swap; swap(c, other.c);'.
432
433 /// Return a reference providing modifiable access to the front (the
434 /// earliest pushed) element from this `queue` object.
436
437 /// Return a reference providing modifiable access to the back (the
438 /// latest pushed) element of this `queue` object.
439 reference back();
440
441 // ACCESSORS
442
443 /// Return `true` if this `queue` object contains no elements, and
444 /// `false` otherwise. In effect, performs `return c.empty();`.
445 bool empty() const;
446
447 /// Return the number of elements in this queue. In effect, performs
448 /// `return c.size();`.
449 size_type size() const;
450
451 /// Return the immutable front (the earliest pushed) element from this
452 /// `queue` object. In effect, performs `c.front()`.
453 const_reference front() const;
454
455 /// Return the immutable back (the latest pushed) element from this
456 /// `queue` object. In effect, performs `c.back()`.
457 const_reference back() const;
458};
459
460#ifdef BSLS_COMPILERFEATURES_SUPPORT_CTAD
461// CLASS TEMPLATE DEDUCTION GUIDES
462
463/// Deduce the template parameters `VALUE` and `CONTAINER` from the
464/// parameters supplied to the constructor of `queue`. This deduction guide
465/// does not participate if the parameter meets the requirements for a
466/// standard allocator.
467template<class CONTAINER,
468 class = bsl::enable_if_t<!bsl::IsStdAllocator_v<CONTAINER>>
469 >
470queue(CONTAINER) -> queue<typename CONTAINER::value_type, CONTAINER>;
471
472/// Deduce the template parameters `VALUE` and `CONTAINER` from the
473/// parameters supplied to the constructor of `queue`. This deduction
474/// guide does not participate unless the supplied allocator is convertible
475/// to the underlying container's `allocator_type`.
476template<
477 class CONTAINER,
478 class ALLOCATOR,
479 class = bsl::enable_if_t<bsl::uses_allocator_v<CONTAINER, ALLOCATOR>>
480 >
481queue(CONTAINER, ALLOCATOR) -> queue<typename CONTAINER::value_type, CONTAINER>;
482#endif
483
484// FREE OPERATORS
485
486/// Return `true` if the specified `lhs` and `rhs` objects have the same
487/// value, and `false` otherwise. Two `queue` objects `lhs` and `rhs` have
488/// the same value if they have the same number of elements, and each
489/// element in the ordered sequence of elements of `lhs` has the same value
490/// as the corresponding element in the ordered sequence of elements of
491/// `rhs`. This method requires that the (template parameter) type `VALUE`
492/// be `equality-comparable` (see {Requirements on `VALUE`}).
493template <class VALUE, class CONTAINER>
494bool operator==(const queue<VALUE, CONTAINER>& lhs,
495 const queue<VALUE, CONTAINER>& rhs);
496
497/// Return `true` if the specified `lhs` and `rhs` objects do not have the
498/// same value, and `false` otherwise. Two `queue` objects `lhs` and `rhs`
499/// do not have the same value if they do not have the same number of
500/// elements, or some element in the ordered sequence of elements of `lhs`
501/// does not have the same value as the corresponding element in the ordered
502/// sequence of elements of `rhs`. This method requires that the (template
503/// parameter) type `VALUE` be `equality-comparable` (see {Requirements on
504/// `VALUE`}).
505template <class VALUE, class CONTAINER>
506bool operator!=(const queue<VALUE, CONTAINER>& lhs,
507 const queue<VALUE, CONTAINER>& rhs);
508
509/// Return `true` if the value of the specified `lhs` queue is
510/// lexicographically less than that of the specified `rhs` queue, and
511/// `false` otherwise. Given iterators `i` and `j` over the respective
512/// sequences `[lhs.begin() .. lhs.end())` and `[rhs.begin() .. rhs.end())`,
513/// the value of queue `lhs` is lexicographically less than that of queue
514/// `rhs` if `true == *i < *j` for the first pair of corresponding iterator
515/// positions where `*i < *j` and `*j < *i` are not both `false`. If no
516/// such corresponding iterator position exists, the value of `lhs` is
517/// lexicographically less than that of `rhs` if `lhs.size() < rhs.size()`.
518/// This method requires that `operator<`, inducing a total order, be
519/// defined for `value_type`.
520template <class VALUE, class CONTAINER>
521bool operator< (const queue<VALUE, CONTAINER>& lhs,
522 const queue<VALUE, CONTAINER>& rhs);
523
524/// Return `true` if the value of the specified `lhs` queue is
525/// lexicographically greater than that of the specified `rhs` queue, and
526/// `false` otherwise. The value of queue `lhs` is lexicographically
527/// greater than that of queue `rhs` if `rhs` is lexicographically less than
528/// `lhs` (see `operator<`). This method requires that `operator<`,
529/// inducing a total order, be defined for `value_type`. Note that this
530/// operator returns `rhs < lhs`.
531template <class VALUE, class CONTAINER>
532bool operator> (const queue<VALUE, CONTAINER>& lhs,
533 const queue<VALUE, CONTAINER>& rhs);
534
535/// Return `true` if the value of the specified `lhs` queue is
536/// lexicographically less than or equal to that of the specified `rhs`
537/// queue, and `false` otherwise. The value of queue `lhs` is
538/// lexicographically less than or equal to that of queue `rhs` if `rhs` is
539/// not lexicographically less than `lhs` (see `operator<`). This method
540/// requires that `operator<`, inducing a total order, be defined for
541/// `value_type`. Note that this operator returns `!(rhs < lhs)`.
542template <class VALUE, class CONTAINER>
543bool operator<=(const queue<VALUE, CONTAINER>& lhs,
544 const queue<VALUE, CONTAINER>& rhs);
545
546/// Return `true` if the value of the specified `lhs` queue is
547/// lexicographically greater than or equal to that of the specified `rhs`
548/// queue, and `false` otherwise. The value of queue `lhs` is
549/// lexicographically greater than or equal to that of queue `rhs` if `lhs`
550/// is not lexicographically less than `rhs` (see `operator<`). This method
551/// requires that `operator<`, inducing a total order, be defined for
552/// `value_type`. Note that this operator returns `!(lhs < rhs)`.
553template <class VALUE, class CONTAINER>
554bool operator>=(const queue<VALUE, CONTAINER>& lhs,
555 const queue<VALUE, CONTAINER>& rhs);
556
557// FREE FUNCTIONS
558
559/// Swap the value of the specified `lhs` queue with the value of the
560/// specified `rhs` queue.
561template <class VALUE, class CONTAINER>
562void swap(queue<VALUE, CONTAINER>& lhs,
563 queue<VALUE, CONTAINER>& rhs)
565
566// ============================================================================
567// TEMPLATE AND INLINE FUNCTION DEFINITIONS
568// ============================================================================
569
570 // -----------
571 // class queue
572 // -----------
573
574// CREATORS
575template <class VALUE, class CONTAINER>
576inline
578{
579}
580
581template <class VALUE, class CONTAINER>
582inline
583queue<VALUE, CONTAINER>::queue(const queue& original)
584: c(original.c)
585{
586}
587
588template <class VALUE, class CONTAINER>
589inline
590queue<VALUE, CONTAINER>::queue(BloombergLP::bslmf::MovableRef<queue> original)
591: c(MoveUtil::move(MoveUtil::access(original).c))
592{
593}
594
595template <class VALUE, class CONTAINER>
596inline
597queue<VALUE, CONTAINER>::queue(const CONTAINER& container)
598: c(container)
599{
600}
601
602template <class VALUE, class CONTAINER>
603template <class ALLOCATOR>
604inline
605queue<VALUE, CONTAINER>::queue(
606 const ALLOCATOR& basicAllocator,
608 ALLOCATOR>::type *)
609: c(basicAllocator)
610{
611}
612
613template <class VALUE, class CONTAINER>
614template <class ALLOCATOR>
615inline
616queue<VALUE, CONTAINER>::queue(
617 const CONTAINER& container,
618 const ALLOCATOR& basicAllocator,
620 ALLOCATOR>::type *)
621: c(container, basicAllocator)
622{
623}
624
625template <class VALUE, class CONTAINER>
626template <class ALLOCATOR>
627inline
628queue<VALUE, CONTAINER>::queue(
629 const queue& queue,
630 const ALLOCATOR& basicAllocator,
632 ALLOCATOR>::type *)
633: c(queue.c, basicAllocator)
634{
635}
636
637template <class VALUE, class CONTAINER>
638inline
639queue<VALUE, CONTAINER>::queue(BloombergLP::bslmf::MovableRef<CONTAINER>
640 container)
641: c(MoveUtil::move(container))
642{
643}
644
645template <class VALUE, class CONTAINER>
646template <class ALLOCATOR>
647inline
648queue<VALUE, CONTAINER>::queue(
649 BloombergLP::bslmf::MovableRef<CONTAINER> container,
650 const ALLOCATOR& basicAllocator,
652 ALLOCATOR>::type *)
653: c(MoveUtil::move(container), basicAllocator)
654{
655}
656
657template <class VALUE, class CONTAINER>
658template <class ALLOCATOR>
659inline
660queue<VALUE, CONTAINER>::queue(
661 BloombergLP::bslmf::MovableRef<queue> original,
662 const ALLOCATOR& basicAllocator,
664 ALLOCATOR>::type *)
665: c(MoveUtil::move(MoveUtil::access(original).c), basicAllocator)
666{
667}
668
669// MANIPULATORS
670template <class VALUE, class CONTAINER>
671inline
672queue<VALUE, CONTAINER>& queue<VALUE, CONTAINER>::operator=(const queue& rhs)
673{
674 c = rhs.c;
675 return *this;
676}
677
678template <class VALUE, class CONTAINER>
679inline
680queue<VALUE, CONTAINER>& queue<VALUE, CONTAINER>::operator=(
681 BloombergLP::bslmf::MovableRef<queue> rhs)
682{
683 c = MoveUtil::move(MoveUtil::access(rhs).c);
684 return *this;
685}
686
687#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
688// {{{ BEGIN GENERATED CODE
689// Command line: sim_cpp11_features.pl bslstl_queue.h
690#ifndef BSLSTL_QUEUE_VARIADIC_LIMIT
691#define BSLSTL_QUEUE_VARIADIC_LIMIT 10
692#endif
693#ifndef BSLSTL_QUEUE_VARIADIC_LIMIT_B
694#define BSLSTL_QUEUE_VARIADIC_LIMIT_B BSLSTL_QUEUE_VARIADIC_LIMIT
695#endif
696#if BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 0
697template <class VALUE, class CONTAINER>
698inline
699typename queue<VALUE, CONTAINER>::reference
700queue<VALUE, CONTAINER>::emplace(
701 )
702{
703 c.emplace_back();
704 return back();
705}
706#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 0
707
708#if BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 1
709template <class VALUE, class CONTAINER>
710template <class Args_01>
711inline
712typename queue<VALUE, CONTAINER>::reference
713queue<VALUE, CONTAINER>::emplace(
714 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01)
715{
716 c.emplace_back(BSLS_COMPILERFEATURES_FORWARD(Args_01,args_01));
717 return back();
718}
719#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 1
720
721#if BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 2
722template <class VALUE, class CONTAINER>
723template <class Args_01,
724 class Args_02>
725inline
726typename queue<VALUE, CONTAINER>::reference
727queue<VALUE, CONTAINER>::emplace(
728 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
729 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02)
730{
731 c.emplace_back(BSLS_COMPILERFEATURES_FORWARD(Args_01,args_01),
732 BSLS_COMPILERFEATURES_FORWARD(Args_02,args_02));
733 return back();
734}
735#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 2
736
737#if BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 3
738template <class VALUE, class CONTAINER>
739template <class Args_01,
740 class Args_02,
741 class Args_03>
742inline
743typename queue<VALUE, CONTAINER>::reference
744queue<VALUE, CONTAINER>::emplace(
745 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
746 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
747 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03)
748{
749 c.emplace_back(BSLS_COMPILERFEATURES_FORWARD(Args_01,args_01),
750 BSLS_COMPILERFEATURES_FORWARD(Args_02,args_02),
751 BSLS_COMPILERFEATURES_FORWARD(Args_03,args_03));
752 return back();
753}
754#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 3
755
756#if BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 4
757template <class VALUE, class CONTAINER>
758template <class Args_01,
759 class Args_02,
760 class Args_03,
761 class Args_04>
762inline
763typename queue<VALUE, CONTAINER>::reference
764queue<VALUE, CONTAINER>::emplace(
765 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
766 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
767 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
768 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04)
769{
770 c.emplace_back(BSLS_COMPILERFEATURES_FORWARD(Args_01,args_01),
771 BSLS_COMPILERFEATURES_FORWARD(Args_02,args_02),
772 BSLS_COMPILERFEATURES_FORWARD(Args_03,args_03),
773 BSLS_COMPILERFEATURES_FORWARD(Args_04,args_04));
774 return back();
775}
776#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 4
777
778#if BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 5
779template <class VALUE, class CONTAINER>
780template <class Args_01,
781 class Args_02,
782 class Args_03,
783 class Args_04,
784 class Args_05>
785inline
786typename queue<VALUE, CONTAINER>::reference
787queue<VALUE, CONTAINER>::emplace(
788 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
789 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
790 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
791 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
792 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05)
793{
794 c.emplace_back(BSLS_COMPILERFEATURES_FORWARD(Args_01,args_01),
795 BSLS_COMPILERFEATURES_FORWARD(Args_02,args_02),
796 BSLS_COMPILERFEATURES_FORWARD(Args_03,args_03),
797 BSLS_COMPILERFEATURES_FORWARD(Args_04,args_04),
798 BSLS_COMPILERFEATURES_FORWARD(Args_05,args_05));
799 return back();
800}
801#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 5
802
803#if BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 6
804template <class VALUE, class CONTAINER>
805template <class Args_01,
806 class Args_02,
807 class Args_03,
808 class Args_04,
809 class Args_05,
810 class Args_06>
811inline
812typename queue<VALUE, CONTAINER>::reference
813queue<VALUE, CONTAINER>::emplace(
814 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
815 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
816 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
817 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
818 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
819 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06)
820{
821 c.emplace_back(BSLS_COMPILERFEATURES_FORWARD(Args_01,args_01),
822 BSLS_COMPILERFEATURES_FORWARD(Args_02,args_02),
823 BSLS_COMPILERFEATURES_FORWARD(Args_03,args_03),
824 BSLS_COMPILERFEATURES_FORWARD(Args_04,args_04),
825 BSLS_COMPILERFEATURES_FORWARD(Args_05,args_05),
826 BSLS_COMPILERFEATURES_FORWARD(Args_06,args_06));
827 return back();
828}
829#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 6
830
831#if BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 7
832template <class VALUE, class CONTAINER>
833template <class Args_01,
834 class Args_02,
835 class Args_03,
836 class Args_04,
837 class Args_05,
838 class Args_06,
839 class Args_07>
840inline
841typename queue<VALUE, CONTAINER>::reference
842queue<VALUE, CONTAINER>::emplace(
843 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
844 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
845 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
846 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
847 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
848 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
849 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07)
850{
851 c.emplace_back(BSLS_COMPILERFEATURES_FORWARD(Args_01,args_01),
852 BSLS_COMPILERFEATURES_FORWARD(Args_02,args_02),
853 BSLS_COMPILERFEATURES_FORWARD(Args_03,args_03),
854 BSLS_COMPILERFEATURES_FORWARD(Args_04,args_04),
855 BSLS_COMPILERFEATURES_FORWARD(Args_05,args_05),
856 BSLS_COMPILERFEATURES_FORWARD(Args_06,args_06),
857 BSLS_COMPILERFEATURES_FORWARD(Args_07,args_07));
858 return back();
859}
860#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 7
861
862#if BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 8
863template <class VALUE, class CONTAINER>
864template <class Args_01,
865 class Args_02,
866 class Args_03,
867 class Args_04,
868 class Args_05,
869 class Args_06,
870 class Args_07,
871 class Args_08>
872inline
873typename queue<VALUE, CONTAINER>::reference
874queue<VALUE, CONTAINER>::emplace(
875 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
876 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
877 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
878 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
879 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
880 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
881 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
882 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08)
883{
884 c.emplace_back(BSLS_COMPILERFEATURES_FORWARD(Args_01,args_01),
885 BSLS_COMPILERFEATURES_FORWARD(Args_02,args_02),
886 BSLS_COMPILERFEATURES_FORWARD(Args_03,args_03),
887 BSLS_COMPILERFEATURES_FORWARD(Args_04,args_04),
888 BSLS_COMPILERFEATURES_FORWARD(Args_05,args_05),
889 BSLS_COMPILERFEATURES_FORWARD(Args_06,args_06),
890 BSLS_COMPILERFEATURES_FORWARD(Args_07,args_07),
891 BSLS_COMPILERFEATURES_FORWARD(Args_08,args_08));
892 return back();
893}
894#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 8
895
896#if BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 9
897template <class VALUE, class CONTAINER>
898template <class Args_01,
899 class Args_02,
900 class Args_03,
901 class Args_04,
902 class Args_05,
903 class Args_06,
904 class Args_07,
905 class Args_08,
906 class Args_09>
907inline
908typename queue<VALUE, CONTAINER>::reference
909queue<VALUE, CONTAINER>::emplace(
910 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
911 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
912 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
913 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
914 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
915 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
916 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
917 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
918 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09)
919{
920 c.emplace_back(BSLS_COMPILERFEATURES_FORWARD(Args_01,args_01),
921 BSLS_COMPILERFEATURES_FORWARD(Args_02,args_02),
922 BSLS_COMPILERFEATURES_FORWARD(Args_03,args_03),
923 BSLS_COMPILERFEATURES_FORWARD(Args_04,args_04),
924 BSLS_COMPILERFEATURES_FORWARD(Args_05,args_05),
925 BSLS_COMPILERFEATURES_FORWARD(Args_06,args_06),
926 BSLS_COMPILERFEATURES_FORWARD(Args_07,args_07),
927 BSLS_COMPILERFEATURES_FORWARD(Args_08,args_08),
928 BSLS_COMPILERFEATURES_FORWARD(Args_09,args_09));
929 return back();
930}
931#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 9
932
933#if BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 10
934template <class VALUE, class CONTAINER>
935template <class Args_01,
936 class Args_02,
937 class Args_03,
938 class Args_04,
939 class Args_05,
940 class Args_06,
941 class Args_07,
942 class Args_08,
943 class Args_09,
944 class Args_10>
945inline
946typename queue<VALUE, CONTAINER>::reference
947queue<VALUE, CONTAINER>::emplace(
948 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) args_01,
949 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) args_02,
950 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) args_03,
951 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) args_04,
952 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) args_05,
953 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) args_06,
954 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) args_07,
955 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) args_08,
956 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) args_09,
957 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) args_10)
958{
959 c.emplace_back(BSLS_COMPILERFEATURES_FORWARD(Args_01,args_01),
960 BSLS_COMPILERFEATURES_FORWARD(Args_02,args_02),
961 BSLS_COMPILERFEATURES_FORWARD(Args_03,args_03),
962 BSLS_COMPILERFEATURES_FORWARD(Args_04,args_04),
963 BSLS_COMPILERFEATURES_FORWARD(Args_05,args_05),
964 BSLS_COMPILERFEATURES_FORWARD(Args_06,args_06),
965 BSLS_COMPILERFEATURES_FORWARD(Args_07,args_07),
966 BSLS_COMPILERFEATURES_FORWARD(Args_08,args_08),
967 BSLS_COMPILERFEATURES_FORWARD(Args_09,args_09),
968 BSLS_COMPILERFEATURES_FORWARD(Args_10,args_10));
969 return back();
970}
971#endif // BSLSTL_QUEUE_VARIADIC_LIMIT_B >= 10
972
973#else
974// The generated code below is a workaround for the absence of perfect
975// forwarding in some compilers.
976template <class VALUE, class CONTAINER>
977template <class... Args>
978inline
979typename queue<VALUE, CONTAINER>::reference
980queue<VALUE, CONTAINER>::emplace(
982{
983 c.emplace_back(BSLS_COMPILERFEATURES_FORWARD(Args,args)...);
984 return back();
985}
986// }}} END GENERATED CODE
987#endif
988
989template <class VALUE, class CONTAINER>
990inline
991void queue<VALUE, CONTAINER>::push(const value_type& value)
992{
993 c.push_back(value);
994}
995
996template <class VALUE, class CONTAINER>
997inline
998void queue<VALUE, CONTAINER>::push(BloombergLP::bslmf::MovableRef<value_type>
999 value)
1000{
1001 c.push_back(MoveUtil::move(value));
1002}
1003
1004template <class VALUE, class CONTAINER>
1005inline
1006void queue<VALUE, CONTAINER>::pop()
1007{
1008 c.pop_front();
1009}
1010
1011template <class VALUE, class CONTAINER>
1012inline
1013void queue<VALUE, CONTAINER>::swap(queue& other)
1015 bsl::is_nothrow_swappable<CONTAINER>::value)
1016{
1017 BloombergLP::bslalg::SwapUtil::swap(&c, &other.c);
1018}
1019
1020// ACCESSORS
1021template <class VALUE, class CONTAINER>
1022inline
1023bool queue<VALUE, CONTAINER>::empty() const
1024{
1025 return c.empty();
1026}
1027
1028template <class VALUE, class CONTAINER>
1029inline
1030typename queue<VALUE, CONTAINER>::size_type
1031queue<VALUE, CONTAINER>::size() const
1032{
1033 return c.size();
1034}
1035
1036template <class VALUE, class CONTAINER>
1037inline
1038typename queue<VALUE, CONTAINER>::reference
1039queue<VALUE, CONTAINER>::front()
1040{
1041 return c.front();
1042}
1043
1044template <class VALUE, class CONTAINER>
1045inline
1046typename queue<VALUE, CONTAINER>::const_reference
1047queue<VALUE, CONTAINER>::front() const
1048{
1049 return c.front();
1050}
1051
1052template <class VALUE, class CONTAINER>
1053inline
1054typename queue<VALUE, CONTAINER>::reference
1055queue<VALUE, CONTAINER>::back()
1056{
1057 return c.back();
1058}
1059
1060template <class VALUE, class CONTAINER>
1061inline
1062typename queue<VALUE, CONTAINER>::const_reference
1063queue<VALUE, CONTAINER>::back() const
1064{
1065 return c.back();
1066}
1067
1068// FREE OPERATORS
1069template <class VALUE, class CONTAINER>
1070inline
1071bool operator==(const queue<VALUE, CONTAINER>& lhs,
1072 const queue<VALUE, CONTAINER>& rhs)
1073{
1074 return lhs.c == rhs.c;
1075}
1076
1077template <class VALUE, class CONTAINER>
1078inline
1079bool operator!=(const queue<VALUE, CONTAINER>& lhs,
1080 const queue<VALUE, CONTAINER>& rhs)
1081{
1082 return lhs.c != rhs.c;
1083}
1084
1085template <class VALUE, class CONTAINER>
1086inline
1087bool operator< (const queue<VALUE, CONTAINER>& lhs,
1088 const queue<VALUE, CONTAINER>& rhs)
1089{
1090 return lhs.c < rhs.c;
1091}
1092
1093template <class VALUE, class CONTAINER>
1094inline
1095bool operator> (const queue<VALUE, CONTAINER>& lhs,
1096 const queue<VALUE, CONTAINER>& rhs)
1097{
1098 return lhs.c > rhs.c;
1099}
1100
1101template <class VALUE, class CONTAINER>
1102inline
1103bool operator<=(const queue<VALUE, CONTAINER>& lhs,
1104 const queue<VALUE, CONTAINER>& rhs)
1105{
1106 return lhs.c <= rhs.c;
1107}
1108
1109template <class VALUE, class CONTAINER>
1110inline
1111bool operator>=(const queue<VALUE, CONTAINER>& lhs,
1112 const queue<VALUE, CONTAINER>& rhs)
1113{
1114 return lhs.c >= rhs.c;
1115}
1116
1117#if defined BSLS_COMPILERFEATURES_SUPPORT_THREE_WAY_COMPARISON \
1118 && defined BSLS_LIBRARYFEATURES_HAS_CPP20_CONCEPTS
1119template <class VALUE, three_way_comparable CONTAINER>
1120inline compare_three_way_result_t<CONTAINER>
1121operator<=>(const queue<VALUE, CONTAINER>& lhs,
1122 const queue<VALUE, CONTAINER>& rhs)
1123{
1124 return lhs.c <=> rhs.c;
1125}
1126#endif
1127
1128// FREE FUNCTIONS
1129template <class VALUE, class CONTAINER>
1130inline
1131void swap(queue<VALUE, CONTAINER>& lhs,
1132 queue<VALUE, CONTAINER>& rhs)
1134{
1135 lhs.swap(rhs);
1136}
1137
1138} // close namespace bsl
1139
1140#else // if ! defined(DEFINED_BSLSTL_QUEUE_H)
1141# error Not valid except when included from bslstl_queue.h
1142#endif // ! defined(COMPILING_BSLSTL_QUEUE_H)
1143
1144#endif // ! defined(INCLUDED_BSLSTL_QUEUE_CPP03)
1145
1146// ----------------------------------------------------------------------------
1147// Copyright 2016 Bloomberg Finance L.P.
1148//
1149// Licensed under the Apache License, Version 2.0 (the "License");
1150// you may not use this file except in compliance with the License.
1151// You may obtain a copy of the License at
1152//
1153// http://www.apache.org/licenses/LICENSE-2.0
1154//
1155// Unless required by applicable law or agreed to in writing, software
1156// distributed under the License is distributed on an "AS IS" BASIS,
1157// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1158// See the License for the specific language governing permissions and
1159// limitations under the License.
1160// ----------------------------- END-OF-FILE ----------------------------------
1161
1162/** @} */
1163/** @} */
1164/** @} */
#define BSLMF_NESTED_TRAIT_DECLARATION_IF(t_TYPE, t_TRAIT, t_COND)
Definition bslmf_nestedtraitdeclaration.h:243
friend bool operator==(const queue< VALUE2, CONTAINER2 > &, const queue< VALUE2, CONTAINER2 > &)
void pop()
Definition bslstl_queue.h:790
CONTAINER::const_reference const_reference
Definition bslstl_queue.h:354
size_type size() const
Definition bslstl_queue.h:815
friend bool operator<=(const queue< VALUE2, CONTAINER2 > &, const queue< VALUE2, CONTAINER2 > &)
queue()
Definition bslstl_queue.h:651
bool empty() const
Definition bslstl_queue.h:807
friend bool operator>=(const queue< VALUE2, CONTAINER2 > &, const queue< VALUE2, CONTAINER2 > &)
friend bool operator!=(const queue< VALUE2, CONTAINER2 > &, const queue< VALUE2, CONTAINER2 > &)
CONTAINER::value_type value_type
Definition bslstl_queue.h:352
void push(const value_type &value)
Definition bslstl_queue.h:775
CONTAINER::size_type size_type
Definition bslstl_queue.h:355
queue & operator=(const queue &rhs)
Definition bslstl_queue.h:746
void swap(queue &other) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(bsl reference front()
Definition bslstl_queue.h:509
reference back()
Definition bslstl_queue.h:839
CONTAINER container_type
Definition bslstl_queue.h:356
CONTAINER::reference reference
Definition bslstl_queue.h:353
friend bool operator<(const queue< VALUE2, CONTAINER2 > &, const queue< VALUE2, CONTAINER2 > &)
friend bool operator>(const queue< VALUE2, CONTAINER2 > &, const queue< VALUE2, CONTAINER2 > &)
reference emplace(Args &&... args)
Definition bslstl_queue.h:766
CONTAINER c
Definition bslstl_queue.h:360
#define BSLMF_ASSERT(expr)
Definition bslmf_assert.h:229
static const t_TYPE value
Definition bslmf_integralconstant.h:258
#define BSLS_COMPILERFEATURES_FORWARD_REF(T)
Definition bsls_compilerfeatures.h:2012
#define BSLS_COMPILERFEATURES_FORWARD(T, V)
Definition bsls_compilerfeatures.h:2018
#define BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(...)
Definition bsls_keyword.h:634
bool operator!=(const FileCleanerConfiguration &lhs, const FileCleanerConfiguration &rhs)
bool operator==(const FileCleanerConfiguration &lhs, const FileCleanerConfiguration &rhs)
void swap(OptionValue &a, OptionValue &b)
bool operator>=(const Guid &lhs, const Guid &rhs)
bool operator<=(const Guid &lhs, const Guid &rhs)
Definition bdlb_printmethods.h:283
Definition bslmf_usesallocator.h:165