BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslalg_dequeprimitives_cpp03.h
Go to the documentation of this file.
1/// @file bslalg_dequeprimitives_cpp03.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bslalg_dequeprimitives_cpp03.h -*-C++-*-
8
9// Automatically generated file. **DO NOT EDIT**
10
11#ifndef INCLUDED_BSLALG_DEQUEPRIMITIVES_CPP03
12#define INCLUDED_BSLALG_DEQUEPRIMITIVES_CPP03
13
14/// @defgroup bslalg_dequeprimitives_cpp03 bslalg_dequeprimitives_cpp03
15/// @brief Provide C++03 implementation for bslalg_dequeprimitives.h
16/// @addtogroup bsl
17/// @{
18/// @addtogroup bslalg
19/// @{
20/// @addtogroup bslalg_dequeprimitives_cpp03
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bslalg_dequeprimitives_cpp03-purpose"> Purpose</a>
25/// * <a href="#bslalg_dequeprimitives_cpp03-classes"> Classes </a>
26/// * <a href="#bslalg_dequeprimitives_cpp03-description"> Description </a>
27///
28/// # Purpose {#bslalg_dequeprimitives_cpp03-purpose}
29/// Provide C++03 implementation for bslalg_dequeprimitives.h
30///
31/// # Classes {#bslalg_dequeprimitives_cpp03-classes}
32/// See bslalg_dequeprimitives.h for list of classes
33///
34/// @see bslalg_dequeprimitives
35///
36/// # Description {#bslalg_dequeprimitives_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:00 2024
48/// Command line: sim_cpp11_features.pl bslalg_dequeprimitives.h
49/// @}
50/** @} */
51/** @} */
52
53/** @addtogroup bsl
54 * @{
55 */
56/** @addtogroup bslalg
57 * @{
58 */
59/** @addtogroup bslalg_dequeprimitives_cpp03
60 * @{
61 */
62
63#ifdef COMPILING_BSLALG_DEQUEPRIMITIVES_H
64
65
66
67namespace {
68 // Workaround for windows. The windows compiler refuses to recognize
69 // enum declarations within a class template. TBD: verify this is
70 // still a concern with recent Windows compilers, as unnamed namespaces
71 // in header files are not a great workaround.
72
73 enum {
74 // These constants are used in the overloads below, when the last
75 // argument is of type 'bsl::integral_constant<int, N>', indicating
76 // that 'VALUE_TYPE' has the traits for which the enumerator equal to
77 // 'N' is named.
78
79 NIL_TRAITS = 0,
80 BITWISE_MOVEABLE_TRAITS = 1,
81 BITWISE_COPYABLE_TRAITS = 2,
82 NON_NIL_TRAITS = 3
83 };
84
85} // close unnamed namespace
86
87namespace bslalg {
88
89template <class VALUE_TYPE, int BLOCK_LENGTH, class ALLOCATOR>
90class DequePrimitives_DequeElementGuard;
91
92template <class VALUE_TYPE, int BLOCK_LENGTH>
93class DequePrimitives_DequeMoveGuard;
94
95template <class VALUE_TYPE, int BLOCK_LENGTH, class ALLOCATOR>
96class DequePrimitives_ExternalDequeElementGuard;
97
98template <class VALUE_TYPE, int BLOCK_LENGTH>
99class DequePrimitives_DequeEndpointProctor;
100
101 // ======================
102 // struct DequePrimitives
103 // ======================
104
105/// This `struct` provides a namespace for a suite of utility functions that
106/// operate on deques parameterized by the `VALUE_TYPE` and `BLOCK_LENGTH`.
107/// Depending on the traits of `VALUE_TYPE`, the default and copy
108/// constructors, destructor, assignment operators, etcetera may not be
109/// invoked, and instead the operation can be optimized using a no-op,
110/// bitwise move, or bitwise copy.
111template <class VALUE_TYPE, int BLOCK_LENGTH>
112struct DequePrimitives {
113
114 // PUBLIC TYPES
115 typedef std::size_t size_type;
116 typedef DequeIterator<VALUE_TYPE, BLOCK_LENGTH> Iterator;
117
118 private:
119 // PRIVATE TYPES
120 typedef DequeImpUtil<VALUE_TYPE, BLOCK_LENGTH> ImpUtil;
121 typedef DequePrimitives_DequeMoveGuard<VALUE_TYPE, BLOCK_LENGTH> MoveGuard;
122 typedef bslmf::MovableRefUtil MoveUtil;
123
124 public:
125 // CLASS METHODS
126
127 /// TBD: fix comment
128 /// Call the destructor on each of the elements of a deque of
129 /// parameterized `VALUE_TYPE` in the specified range `[begin .. end)`.
130 /// The behavior is undefined unless `begin <= end`. Note that this
131 /// does not deallocate any memory (except memory deallocated by the
132 /// element destructor calls).
133 template <class ALLOCATOR>
134 static void destruct(Iterator begin, Iterator end, ALLOCATOR allocator);
135
136 /// Call the destructor on each of the elements of a deque of
137 /// parameterized `VALUE_TYPE` in the specified range `[begin .. end)`.
138 /// The behavior is undefined unless `begin <= end`. Note that this
139 /// does not deallocate any memory (except memory deallocated by the
140 /// element destructor calls). Note that the last argument is for
141 /// removing overload ambiguities and is not used.
142 template <class ALLOCATOR>
143 static void destruct(
144 Iterator begin,
145 Iterator end,
146 ALLOCATOR allocator,
148 template <class ALLOCATOR>
149 static void destruct(
150 Iterator begin,
151 Iterator end,
152 ALLOCATOR allocator,
154
155 /// Call the destructor on each of the elements of a deque of
156 /// parameterized `VALUE_TYPE` in the specified range `[first .. last)`.
157 /// Shift the elements to fill up the empty space after the erasure,
158 /// using the smaller of the range defined by `[fromBegin .. first)` and
159 /// `[last .. fromEnd)` after the erasure. Load in the specified
160 /// `toBegin` and `toEnd` the new boundaries of the deque after erasure
161 /// and return an iterator pointing to the element immediately following
162 /// the removed elements. The behavior is undefined unless
163 /// `fromBegin <= first <= last <= fromEnd`.
164 template <class ALLOCATOR>
165 static Iterator erase(Iterator *toBegin,
166 Iterator *toEnd,
167 Iterator fromBegin,
168 Iterator first,
169 Iterator last,
170 Iterator fromEnd,
171 ALLOCATOR allocator);
172
173 /// Call the destructor on each of the elements of a deque of
174 /// parameterized `VALUE_TYPE` in the specified range `[first .. last)`.
175 /// Shift the elements from the smaller of the specified range
176 /// `[fromBegin .. first)` and `[last .. fromEnd)` to fill up the empty
177 /// spaces after the erasure. Load in the specified `toBegin` and
178 /// `toEnd` the new boundaries of the deque after erasure and return an
179 /// iterator pointing to the element immediately following the removed
180 /// elements. The behavior is undefined unless
181 /// `fromBegin <= first <= last <= fromEnd`. Note that the last
182 /// argument is for removing overload ambiguities and is not used.
183 template <class ALLOCATOR>
184 static Iterator erase(
185 Iterator *toBegin,
186 Iterator *toEnd,
187 Iterator fromBegin,
188 Iterator first,
189 Iterator last,
190 Iterator fromEnd,
191 ALLOCATOR allocator,
193 template <class ALLOCATOR>
194 static Iterator erase(
195 Iterator *toBegin,
196 Iterator *toEnd,
197 Iterator fromBegin,
198 Iterator first,
199 Iterator last,
200 Iterator fromEnd,
201 ALLOCATOR allocator,
203
204 /// Insert the specified `numElements` copies of the specified `value`
205 /// at the specified `position`, by moving the elements in the range
206 /// `[position .. fromEnd)` forward by `numElements` position. Pass the
207 /// specified `allocator` to the copy constructor if appropriate. Load
208 /// into the specified `toEnd` an iterator to the end of the deque after
209 /// insertion (i.e., `fromEnd + numElements`). The behavior is
210 /// undefined unless `fromEnd + numElements` is a valid iterator (i.e.,
211 /// the block pointer array holds enough room after the `fromEnd`
212 /// position to insert `numElements`).
213 template <class ALLOCATOR>
214 static void insertAndMoveToBack(Iterator *toEnd,
215 Iterator fromEnd,
216 Iterator position,
217 size_type numElements,
218 const VALUE_TYPE& value,
219 ALLOCATOR allocator);
220
221 /// Insert the specified `numElements` copies of the specified `value`
222 /// at the specified `position`, by moving the elements in the range
223 /// `[position .. fromEnd)` forward by `numElements` position. Pass the
224 /// specified `allocator` to the copy constructor if appropriate. Load
225 /// into the specified `toEnd` an iterator to the end of the deque after
226 /// insertion (i.e., `fromEnd + numElements`). The behavior is
227 /// undefined unless `fromEnd + numElements` is a valid iterator (i.e.,
228 /// the block pointer array holds enough room after the `fromEnd`
229 /// position to insert `numElements`). Note that the last argument is
230 /// for removing overload ambiguities and is not used.
231 template <class ALLOCATOR>
232 static void insertAndMoveToBack(
233 Iterator *toEnd,
234 Iterator fromEnd,
235 Iterator position,
236 size_type numElements,
237 const VALUE_TYPE& value,
238 ALLOCATOR allocator,
240 template <class ALLOCATOR>
241 static void insertAndMoveToBack(
242 Iterator *toEnd,
243 Iterator fromEnd,
244 Iterator position,
245 size_type numElements,
246 const VALUE_TYPE& value,
247 ALLOCATOR allocator,
249 template <class ALLOCATOR>
250 static void insertAndMoveToBack(
251 Iterator *toEnd,
252 Iterator fromEnd,
253 Iterator position,
254 size_type numElements,
255 const VALUE_TYPE& value,
256 ALLOCATOR allocator,
258
259 /// Insert the specified `numElements` in the range `[first .. last)` at
260 /// the specified `position`, by moving the elements in the range
261 /// `[position .. fromEnd)` forward by `numElements` position. Pass the
262 /// specified `allocator` to the copy constructor if appropriate. Load
263 /// into the specified `toEnd` an iterator to the end of the data after
264 /// insertion (i.e., `fromEnd + numElements`). The behavior is
265 /// undefined unless `fromEnd + numElements` is a valid iterator (i.e.,
266 /// the block pointer array holds enough room after the `fromEnd`
267 /// position to insert `numElements`).
268 template <class FWD_ITER, class ALLOCATOR>
269 static void insertAndMoveToBack(Iterator *toEnd,
270 Iterator fromEnd,
271 Iterator position,
272 FWD_ITER first,
273 FWD_ITER last,
274 size_type numElements,
275 ALLOCATOR allocator);
276
277 /// Insert the specified move-insertable `value` at the specified
278 /// `position` by moving the elements in the range
279 /// `[position .. fromEnd)` forward by 1 position; pass the specified
280 /// `allocator` to the move constructor if appropriate. Load into the
281 /// specified `toEnd` an iterator one past the inserted element (i.e.,
282 /// `fromEnd + 1`). The behavior is undefined unless `fromEnd + 1` is a
283 /// valid iterator (i.e., the block pointer array holds enough room
284 /// after the `fromEnd` position to insert 1 element).
285 template <class ALLOCATOR>
286 static void moveInsertAndMoveToBack(
287 Iterator *toEnd,
288 Iterator fromEnd,
289 Iterator position,
291 ALLOCATOR allocator);
292
293 /// Insert the specified move-insertable `value` at the specified
294 /// `position` by moving the elements in the range
295 /// `[position .. fromEnd)` forward by 1 position; pass the specified
296 /// `allocator` to the move constructor if appropriate. Load into the
297 /// specified `toEnd` an iterator one past the inserted element (i.e.,
298 /// `fromEnd + 1`). The behavior is undefined unless `fromEnd + 1` is a
299 /// valid iterator (i.e., the block pointer array holds enough room
300 /// after the `fromEnd` position to insert 1 element). Note that the
301 /// last argument is for removing overload ambiguities and is not used.
302 template <class ALLOCATOR>
303 static void moveInsertAndMoveToBack(
304 Iterator *toEnd,
305 Iterator fromEnd,
306 Iterator position,
308 ALLOCATOR allocator,
310 template <class ALLOCATOR>
311 static void moveInsertAndMoveToBack(
312 Iterator *toEnd,
313 Iterator fromEnd,
314 Iterator position,
316 ALLOCATOR allocator,
318 template <class ALLOCATOR>
319 static void moveInsertAndMoveToBack(
320 Iterator *toEnd,
321 Iterator fromEnd,
322 Iterator position,
324 ALLOCATOR allocator,
326
327 /// Insert the specified `numElements` copies of the specified `value`
328 /// at the specified `position`, by moving the elements in the range
329 /// `[fromBegin .. position)` backward by `numElements` position. Pass
330 /// the specified `allocator` to the copy constructor if appropriate.
331 /// Load into the specified `toBegin` an iterator to the beginning of
332 /// the data after insertion (i.e., `fromBegin - numElements`). The
333 /// behavior is undefined unless `fromBegin - numElements` is a valid
334 /// iterator (i.e., the block pointer array holds enough room before the
335 /// `fromBegin` position to insert `numElements`).
336 template <class ALLOCATOR>
337 static void insertAndMoveToFront(Iterator *toBegin,
338 Iterator fromBegin,
339 Iterator position,
340 size_type numElements,
341 const VALUE_TYPE& value,
342 ALLOCATOR allocator);
343
344 /// Insert the specified `numElements` copies of the specified `value`
345 /// at the specified `position`, by moving the elements in the range
346 /// `[fromBegin .. position)` backward by `numElements` position. Pass
347 /// the specified `allocator` to the copy constructor if appropriate.
348 /// Load into the specified `toBegin` an iterator to the beginning of
349 /// the data after insertion (i.e., `fromBegin - numElements`. The
350 /// behavior is undefined unless `fromBegin - numElements` is a valid
351 /// iterator (i.e., the block pointer array holds enough room before the
352 /// `fromBegin` position to insert `numElements`). Note that the last
353 /// argument is for removing overload ambiguities and is not used.
354 template <class ALLOCATOR>
355 static void insertAndMoveToFront(
356 Iterator *toBegin,
357 Iterator fromBegin,
358 Iterator position,
359 size_type numElements,
360 const VALUE_TYPE& value,
361 ALLOCATOR allocator,
363 template <class ALLOCATOR>
364 static void insertAndMoveToFront(
365 Iterator *toBegin,
366 Iterator fromBegin,
367 Iterator position,
368 size_type numElements,
369 const VALUE_TYPE& value,
370 ALLOCATOR allocator,
372 template <class ALLOCATOR>
373 static void insertAndMoveToFront(
374 Iterator *toBegin,
375 Iterator fromBegin,
376 Iterator position,
377 size_type numElements,
378 const VALUE_TYPE& value,
379 ALLOCATOR allocator,
381
382 /// Insert the specified `numElements` in the range `[first .. last)` at
383 /// the specified `position`, by moving the elements in the range
384 /// `[fromBegin .. position)` backward by `numElements` position. Pass
385 /// the specified `allocator` to the copy constructor if appropriate.
386 /// Load into the specified `toBegin` an iterator to the end of the data
387 /// after insertion (i.e., `fromBegin - numElements`). The behavior is
388 /// undefined unless `fromBegin - numElements` is a valid iterator
389 /// (i.e., the block pointer array holds enough room before the
390 /// `fromBefore` position to insert `numElements`).
391 template <class FWD_ITER, class ALLOCATOR>
392 static void insertAndMoveToFront(Iterator *toBegin,
393 Iterator fromBegin,
394 Iterator position,
395 FWD_ITER first,
396 FWD_ITER last,
397 size_type numElements,
398 ALLOCATOR allocator);
399
400 /// Insert the specified move-insertable `value` at the specified
401 /// `position` by moving the elements in the range
402 /// `[fromBegin .. position)` backward by 1 position; pass the specified
403 /// `allocator` to the move constructor if appropriate. Load into the
404 /// specified `toBegin` an iterator to the inserted element (i.e.,
405 /// `fromBegin - 1`). The behavior is undefined unless
406 /// `fromBegin - 1` is a valid iterator (i.e., the block pointer array
407 /// holds enough room before the `fromBegin` position to insert 1
408 /// element).
409 template <class ALLOCATOR>
410 static void moveInsertAndMoveToFront(
411 Iterator *toBegin,
412 Iterator fromBegin,
413 Iterator position,
415 ALLOCATOR allocator);
416
417 /// Insert the specified move-insertable `value` at the specified
418 /// `position` by moving the elements in the range
419 /// `[fromBegin .. position)` backward by 1 position; pass the specified
420 /// `allocator` to the move constructor if appropriate. Load into the
421 /// specified `toBegin` an iterator to the inserted element (i.e.,
422 /// `fromBegin - 1`). The behavior is undefined unless
423 /// `fromBegin - 1` is a valid iterator (i.e., the block pointer array
424 /// holds enough room before the `fromBegin` position to insert 1
425 /// element). Note that the last argument is for removing overload
426 /// ambiguities and is not used.
427 template <class ALLOCATOR>
428 static void moveInsertAndMoveToFront(
429 Iterator *toBegin,
430 Iterator fromBegin,
431 Iterator position,
433 ALLOCATOR allocator,
435 template <class ALLOCATOR>
436 static void moveInsertAndMoveToFront(
437 Iterator *toBegin,
438 Iterator fromBegin,
439 Iterator position,
441 ALLOCATOR allocator,
443 template <class ALLOCATOR>
444 static void moveInsertAndMoveToFront(
445 Iterator *toBegin,
446 Iterator fromBegin,
447 Iterator position,
449 ALLOCATOR allocator,
451
452#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
453// {{{ BEGIN GENERATED CODE
454// Command line: sim_cpp11_features.pl bslalg_dequeprimitives.h
455#ifndef BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT
456#define BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT 10
457#endif
458#ifndef BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A
459#define BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT
460#endif
461#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 0
462 template <class ALLOCATOR>
463 static void emplaceAndMoveToBack(Iterator *toEnd,
464 Iterator fromEnd,
465 Iterator position,
466 ALLOCATOR allocator);
467#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 0
468
469#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 1
470 template <class ALLOCATOR, class Args_01>
471 static void emplaceAndMoveToBack(Iterator *toEnd,
472 Iterator fromEnd,
473 Iterator position,
474 ALLOCATOR allocator,
475 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01);
476#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 1
477
478#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 2
479 template <class ALLOCATOR, class Args_01,
480 class Args_02>
481 static void emplaceAndMoveToBack(Iterator *toEnd,
482 Iterator fromEnd,
483 Iterator position,
484 ALLOCATOR allocator,
485 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
486 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02);
487#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 2
488
489#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 3
490 template <class ALLOCATOR, class Args_01,
491 class Args_02,
492 class Args_03>
493 static void emplaceAndMoveToBack(Iterator *toEnd,
494 Iterator fromEnd,
495 Iterator position,
496 ALLOCATOR allocator,
497 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
498 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
499 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03);
500#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 3
501
502#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 4
503 template <class ALLOCATOR, class Args_01,
504 class Args_02,
505 class Args_03,
506 class Args_04>
507 static void emplaceAndMoveToBack(Iterator *toEnd,
508 Iterator fromEnd,
509 Iterator position,
510 ALLOCATOR allocator,
511 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
512 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
513 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
514 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04);
515#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 4
516
517#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 5
518 template <class ALLOCATOR, class Args_01,
519 class Args_02,
520 class Args_03,
521 class Args_04,
522 class Args_05>
523 static void emplaceAndMoveToBack(Iterator *toEnd,
524 Iterator fromEnd,
525 Iterator position,
526 ALLOCATOR allocator,
527 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
528 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
529 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
530 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
531 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05);
532#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 5
533
534#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 6
535 template <class ALLOCATOR, class Args_01,
536 class Args_02,
537 class Args_03,
538 class Args_04,
539 class Args_05,
540 class Args_06>
541 static void emplaceAndMoveToBack(Iterator *toEnd,
542 Iterator fromEnd,
543 Iterator position,
544 ALLOCATOR allocator,
545 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
546 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
547 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
548 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
549 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
550 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06);
551#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 6
552
553#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 7
554 template <class ALLOCATOR, class Args_01,
555 class Args_02,
556 class Args_03,
557 class Args_04,
558 class Args_05,
559 class Args_06,
560 class Args_07>
561 static void emplaceAndMoveToBack(Iterator *toEnd,
562 Iterator fromEnd,
563 Iterator position,
564 ALLOCATOR allocator,
565 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
566 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
567 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
568 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
569 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
570 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
571 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07);
572#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 7
573
574#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 8
575 template <class ALLOCATOR, class Args_01,
576 class Args_02,
577 class Args_03,
578 class Args_04,
579 class Args_05,
580 class Args_06,
581 class Args_07,
582 class Args_08>
583 static void emplaceAndMoveToBack(Iterator *toEnd,
584 Iterator fromEnd,
585 Iterator position,
586 ALLOCATOR allocator,
587 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
588 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
589 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
590 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
591 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
592 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
593 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
594 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08);
595#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 8
596
597#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 9
598 template <class ALLOCATOR, class Args_01,
599 class Args_02,
600 class Args_03,
601 class Args_04,
602 class Args_05,
603 class Args_06,
604 class Args_07,
605 class Args_08,
606 class Args_09>
607 static void emplaceAndMoveToBack(Iterator *toEnd,
608 Iterator fromEnd,
609 Iterator position,
610 ALLOCATOR allocator,
611 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
612 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
613 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
614 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
615 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
616 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
617 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
618 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
619 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09);
620#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 9
621
622#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 10
623 template <class ALLOCATOR, class Args_01,
624 class Args_02,
625 class Args_03,
626 class Args_04,
627 class Args_05,
628 class Args_06,
629 class Args_07,
630 class Args_08,
631 class Args_09,
632 class Args_10>
633 static void emplaceAndMoveToBack(Iterator *toEnd,
634 Iterator fromEnd,
635 Iterator position,
636 ALLOCATOR allocator,
637 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
638 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
639 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
640 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
641 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
642 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
643 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
644 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
645 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09,
646 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) arguments_10);
647#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 10
648
649
650#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 0
651 template <class ALLOCATOR>
653 Iterator *toEnd,
654 Iterator fromEnd,
655 Iterator position,
656 ALLOCATOR allocator,
658#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 0
659
660#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 1
661 template <class ALLOCATOR, class Args_01>
663 Iterator *toEnd,
664 Iterator fromEnd,
665 Iterator position,
666 ALLOCATOR allocator,
668 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01);
669#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 1
670
671#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 2
672 template <class ALLOCATOR, class Args_01,
673 class Args_02>
675 Iterator *toEnd,
676 Iterator fromEnd,
677 Iterator position,
678 ALLOCATOR allocator,
680 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
681 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02);
682#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 2
683
684#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 3
685 template <class ALLOCATOR, class Args_01,
686 class Args_02,
687 class Args_03>
689 Iterator *toEnd,
690 Iterator fromEnd,
691 Iterator position,
692 ALLOCATOR allocator,
694 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
695 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
696 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03);
697#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 3
698
699#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 4
700 template <class ALLOCATOR, class Args_01,
701 class Args_02,
702 class Args_03,
703 class Args_04>
705 Iterator *toEnd,
706 Iterator fromEnd,
707 Iterator position,
708 ALLOCATOR allocator,
710 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
711 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
712 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
713 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04);
714#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 4
715
716#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 5
717 template <class ALLOCATOR, class Args_01,
718 class Args_02,
719 class Args_03,
720 class Args_04,
721 class Args_05>
723 Iterator *toEnd,
724 Iterator fromEnd,
725 Iterator position,
726 ALLOCATOR allocator,
728 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
729 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
730 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
731 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
732 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05);
733#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 5
734
735#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 6
736 template <class ALLOCATOR, class Args_01,
737 class Args_02,
738 class Args_03,
739 class Args_04,
740 class Args_05,
741 class Args_06>
743 Iterator *toEnd,
744 Iterator fromEnd,
745 Iterator position,
746 ALLOCATOR allocator,
748 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
749 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
750 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
751 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
752 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
753 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06);
754#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 6
755
756#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 7
757 template <class ALLOCATOR, class Args_01,
758 class Args_02,
759 class Args_03,
760 class Args_04,
761 class Args_05,
762 class Args_06,
763 class Args_07>
765 Iterator *toEnd,
766 Iterator fromEnd,
767 Iterator position,
768 ALLOCATOR allocator,
770 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
771 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
772 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
773 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
774 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
775 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
776 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07);
777#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 7
778
779#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 8
780 template <class ALLOCATOR, class Args_01,
781 class Args_02,
782 class Args_03,
783 class Args_04,
784 class Args_05,
785 class Args_06,
786 class Args_07,
787 class Args_08>
789 Iterator *toEnd,
790 Iterator fromEnd,
791 Iterator position,
792 ALLOCATOR allocator,
794 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
795 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
796 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
797 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
798 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
799 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
800 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
801 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08);
802#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 8
803
804#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 9
805 template <class ALLOCATOR, class Args_01,
806 class Args_02,
807 class Args_03,
808 class Args_04,
809 class Args_05,
810 class Args_06,
811 class Args_07,
812 class Args_08,
813 class Args_09>
815 Iterator *toEnd,
816 Iterator fromEnd,
817 Iterator position,
818 ALLOCATOR allocator,
820 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
821 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
822 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
823 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
824 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
825 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
826 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
827 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
828 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09);
829#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 9
830
831#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 10
832 template <class ALLOCATOR, class Args_01,
833 class Args_02,
834 class Args_03,
835 class Args_04,
836 class Args_05,
837 class Args_06,
838 class Args_07,
839 class Args_08,
840 class Args_09,
841 class Args_10>
843 Iterator *toEnd,
844 Iterator fromEnd,
845 Iterator position,
846 ALLOCATOR allocator,
848 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
849 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
850 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
851 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
852 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
853 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
854 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
855 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
856 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09,
857 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) arguments_10);
858#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 10
859
860#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 0
861 template <class ALLOCATOR>
863 Iterator *toEnd,
864 Iterator fromEnd,
865 Iterator position,
866 ALLOCATOR allocator,
868#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 0
869
870#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 1
871 template <class ALLOCATOR, class Args_01>
873 Iterator *toEnd,
874 Iterator fromEnd,
875 Iterator position,
876 ALLOCATOR allocator,
878 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01);
879#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 1
880
881#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 2
882 template <class ALLOCATOR, class Args_01,
883 class Args_02>
885 Iterator *toEnd,
886 Iterator fromEnd,
887 Iterator position,
888 ALLOCATOR allocator,
890 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
891 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02);
892#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 2
893
894#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 3
895 template <class ALLOCATOR, class Args_01,
896 class Args_02,
897 class Args_03>
899 Iterator *toEnd,
900 Iterator fromEnd,
901 Iterator position,
902 ALLOCATOR allocator,
904 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
905 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
906 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03);
907#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 3
908
909#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 4
910 template <class ALLOCATOR, class Args_01,
911 class Args_02,
912 class Args_03,
913 class Args_04>
915 Iterator *toEnd,
916 Iterator fromEnd,
917 Iterator position,
918 ALLOCATOR allocator,
920 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
921 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
922 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
923 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04);
924#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 4
925
926#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 5
927 template <class ALLOCATOR, class Args_01,
928 class Args_02,
929 class Args_03,
930 class Args_04,
931 class Args_05>
933 Iterator *toEnd,
934 Iterator fromEnd,
935 Iterator position,
936 ALLOCATOR allocator,
938 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
939 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
940 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
941 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
942 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05);
943#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 5
944
945#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 6
946 template <class ALLOCATOR, class Args_01,
947 class Args_02,
948 class Args_03,
949 class Args_04,
950 class Args_05,
951 class Args_06>
953 Iterator *toEnd,
954 Iterator fromEnd,
955 Iterator position,
956 ALLOCATOR allocator,
958 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
959 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
960 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
961 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
962 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
963 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06);
964#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 6
965
966#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 7
967 template <class ALLOCATOR, class Args_01,
968 class Args_02,
969 class Args_03,
970 class Args_04,
971 class Args_05,
972 class Args_06,
973 class Args_07>
975 Iterator *toEnd,
976 Iterator fromEnd,
977 Iterator position,
978 ALLOCATOR allocator,
980 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
981 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
982 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
983 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
984 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
985 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
986 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07);
987#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 7
988
989#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 8
990 template <class ALLOCATOR, class Args_01,
991 class Args_02,
992 class Args_03,
993 class Args_04,
994 class Args_05,
995 class Args_06,
996 class Args_07,
997 class Args_08>
999 Iterator *toEnd,
1000 Iterator fromEnd,
1001 Iterator position,
1002 ALLOCATOR allocator,
1004 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1005 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1006 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1007 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1008 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1009 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1010 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
1011 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08);
1012#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 8
1013
1014#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 9
1015 template <class ALLOCATOR, class Args_01,
1016 class Args_02,
1017 class Args_03,
1018 class Args_04,
1019 class Args_05,
1020 class Args_06,
1021 class Args_07,
1022 class Args_08,
1023 class Args_09>
1024 static void emplaceAndMoveToBackDispatch(
1025 Iterator *toEnd,
1026 Iterator fromEnd,
1027 Iterator position,
1028 ALLOCATOR allocator,
1030 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1031 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1032 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1033 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1034 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1035 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1036 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
1037 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
1038 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09);
1039#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 9
1040
1041#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 10
1042 template <class ALLOCATOR, class Args_01,
1043 class Args_02,
1044 class Args_03,
1045 class Args_04,
1046 class Args_05,
1047 class Args_06,
1048 class Args_07,
1049 class Args_08,
1050 class Args_09,
1051 class Args_10>
1052 static void emplaceAndMoveToBackDispatch(
1053 Iterator *toEnd,
1054 Iterator fromEnd,
1055 Iterator position,
1056 ALLOCATOR allocator,
1058 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1059 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1060 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1061 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1062 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1063 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1064 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
1065 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
1066 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09,
1067 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) arguments_10);
1068#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 10
1069
1070#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 0
1071 template <class ALLOCATOR>
1072 static void emplaceAndMoveToBackDispatch(
1073 Iterator *toEnd,
1074 Iterator fromEnd,
1075 Iterator position,
1076 ALLOCATOR allocator,
1078#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 0
1079
1080#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 1
1081 template <class ALLOCATOR, class Args_01>
1082 static void emplaceAndMoveToBackDispatch(
1083 Iterator *toEnd,
1084 Iterator fromEnd,
1085 Iterator position,
1086 ALLOCATOR allocator,
1088 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01);
1089#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 1
1090
1091#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 2
1092 template <class ALLOCATOR, class Args_01,
1093 class Args_02>
1094 static void emplaceAndMoveToBackDispatch(
1095 Iterator *toEnd,
1096 Iterator fromEnd,
1097 Iterator position,
1098 ALLOCATOR allocator,
1100 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1101 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02);
1102#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 2
1103
1104#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 3
1105 template <class ALLOCATOR, class Args_01,
1106 class Args_02,
1107 class Args_03>
1108 static void emplaceAndMoveToBackDispatch(
1109 Iterator *toEnd,
1110 Iterator fromEnd,
1111 Iterator position,
1112 ALLOCATOR allocator,
1114 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1115 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1116 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03);
1117#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 3
1118
1119#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 4
1120 template <class ALLOCATOR, class Args_01,
1121 class Args_02,
1122 class Args_03,
1123 class Args_04>
1124 static void emplaceAndMoveToBackDispatch(
1125 Iterator *toEnd,
1126 Iterator fromEnd,
1127 Iterator position,
1128 ALLOCATOR allocator,
1130 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1131 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1132 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1133 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04);
1134#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 4
1135
1136#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 5
1137 template <class ALLOCATOR, class Args_01,
1138 class Args_02,
1139 class Args_03,
1140 class Args_04,
1141 class Args_05>
1142 static void emplaceAndMoveToBackDispatch(
1143 Iterator *toEnd,
1144 Iterator fromEnd,
1145 Iterator position,
1146 ALLOCATOR allocator,
1148 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1149 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1150 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1151 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1152 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05);
1153#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 5
1154
1155#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 6
1156 template <class ALLOCATOR, class Args_01,
1157 class Args_02,
1158 class Args_03,
1159 class Args_04,
1160 class Args_05,
1161 class Args_06>
1162 static void emplaceAndMoveToBackDispatch(
1163 Iterator *toEnd,
1164 Iterator fromEnd,
1165 Iterator position,
1166 ALLOCATOR allocator,
1168 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1169 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1170 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1171 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1172 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1173 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06);
1174#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 6
1175
1176#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 7
1177 template <class ALLOCATOR, class Args_01,
1178 class Args_02,
1179 class Args_03,
1180 class Args_04,
1181 class Args_05,
1182 class Args_06,
1183 class Args_07>
1184 static void emplaceAndMoveToBackDispatch(
1185 Iterator *toEnd,
1186 Iterator fromEnd,
1187 Iterator position,
1188 ALLOCATOR allocator,
1190 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1191 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1192 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1193 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1194 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1195 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1196 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07);
1197#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 7
1198
1199#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 8
1200 template <class ALLOCATOR, class Args_01,
1201 class Args_02,
1202 class Args_03,
1203 class Args_04,
1204 class Args_05,
1205 class Args_06,
1206 class Args_07,
1207 class Args_08>
1208 static void emplaceAndMoveToBackDispatch(
1209 Iterator *toEnd,
1210 Iterator fromEnd,
1211 Iterator position,
1212 ALLOCATOR allocator,
1214 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1215 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1216 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1217 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1218 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1219 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1220 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
1221 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08);
1222#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 8
1223
1224#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 9
1225 template <class ALLOCATOR, class Args_01,
1226 class Args_02,
1227 class Args_03,
1228 class Args_04,
1229 class Args_05,
1230 class Args_06,
1231 class Args_07,
1232 class Args_08,
1233 class Args_09>
1234 static void emplaceAndMoveToBackDispatch(
1235 Iterator *toEnd,
1236 Iterator fromEnd,
1237 Iterator position,
1238 ALLOCATOR allocator,
1240 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1241 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1242 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1243 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1244 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1245 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1246 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
1247 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
1248 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09);
1249#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 9
1250
1251#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 10
1252 template <class ALLOCATOR, class Args_01,
1253 class Args_02,
1254 class Args_03,
1255 class Args_04,
1256 class Args_05,
1257 class Args_06,
1258 class Args_07,
1259 class Args_08,
1260 class Args_09,
1261 class Args_10>
1262 static void emplaceAndMoveToBackDispatch(
1263 Iterator *toEnd,
1264 Iterator fromEnd,
1265 Iterator position,
1266 ALLOCATOR allocator,
1268 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1269 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1270 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1271 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1272 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1273 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1274 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
1275 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
1276 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09,
1277 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) arguments_10);
1278#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 10
1279
1280
1281#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 0
1282 template <class ALLOCATOR>
1283 static void emplaceAndMoveToFront(Iterator *toBegin,
1284 Iterator fromBegin,
1285 Iterator position,
1286 ALLOCATOR allocator);
1287#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 0
1288
1289#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 1
1290 template <class ALLOCATOR, class Args_01>
1291 static void emplaceAndMoveToFront(Iterator *toBegin,
1292 Iterator fromBegin,
1293 Iterator position,
1294 ALLOCATOR allocator,
1295 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01);
1296#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 1
1297
1298#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 2
1299 template <class ALLOCATOR, class Args_01,
1300 class Args_02>
1301 static void emplaceAndMoveToFront(Iterator *toBegin,
1302 Iterator fromBegin,
1303 Iterator position,
1304 ALLOCATOR allocator,
1305 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1306 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02);
1307#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 2
1308
1309#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 3
1310 template <class ALLOCATOR, class Args_01,
1311 class Args_02,
1312 class Args_03>
1313 static void emplaceAndMoveToFront(Iterator *toBegin,
1314 Iterator fromBegin,
1315 Iterator position,
1316 ALLOCATOR allocator,
1317 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1318 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1319 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03);
1320#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 3
1321
1322#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 4
1323 template <class ALLOCATOR, class Args_01,
1324 class Args_02,
1325 class Args_03,
1326 class Args_04>
1327 static void emplaceAndMoveToFront(Iterator *toBegin,
1328 Iterator fromBegin,
1329 Iterator position,
1330 ALLOCATOR allocator,
1331 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1332 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1333 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1334 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04);
1335#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 4
1336
1337#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 5
1338 template <class ALLOCATOR, class Args_01,
1339 class Args_02,
1340 class Args_03,
1341 class Args_04,
1342 class Args_05>
1343 static void emplaceAndMoveToFront(Iterator *toBegin,
1344 Iterator fromBegin,
1345 Iterator position,
1346 ALLOCATOR allocator,
1347 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1348 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1349 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1350 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1351 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05);
1352#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 5
1353
1354#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 6
1355 template <class ALLOCATOR, class Args_01,
1356 class Args_02,
1357 class Args_03,
1358 class Args_04,
1359 class Args_05,
1360 class Args_06>
1361 static void emplaceAndMoveToFront(Iterator *toBegin,
1362 Iterator fromBegin,
1363 Iterator position,
1364 ALLOCATOR allocator,
1365 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1366 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1367 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1368 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1369 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1370 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06);
1371#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 6
1372
1373#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 7
1374 template <class ALLOCATOR, class Args_01,
1375 class Args_02,
1376 class Args_03,
1377 class Args_04,
1378 class Args_05,
1379 class Args_06,
1380 class Args_07>
1381 static void emplaceAndMoveToFront(Iterator *toBegin,
1382 Iterator fromBegin,
1383 Iterator position,
1384 ALLOCATOR allocator,
1385 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1386 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1387 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1388 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1389 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1390 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1391 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07);
1392#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 7
1393
1394#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 8
1395 template <class ALLOCATOR, class Args_01,
1396 class Args_02,
1397 class Args_03,
1398 class Args_04,
1399 class Args_05,
1400 class Args_06,
1401 class Args_07,
1402 class Args_08>
1403 static void emplaceAndMoveToFront(Iterator *toBegin,
1404 Iterator fromBegin,
1405 Iterator position,
1406 ALLOCATOR allocator,
1407 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1408 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1409 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1410 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1411 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1412 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1413 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
1414 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08);
1415#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 8
1416
1417#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 9
1418 template <class ALLOCATOR, class Args_01,
1419 class Args_02,
1420 class Args_03,
1421 class Args_04,
1422 class Args_05,
1423 class Args_06,
1424 class Args_07,
1425 class Args_08,
1426 class Args_09>
1427 static void emplaceAndMoveToFront(Iterator *toBegin,
1428 Iterator fromBegin,
1429 Iterator position,
1430 ALLOCATOR allocator,
1431 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1432 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1433 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1434 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1435 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1436 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1437 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
1438 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
1439 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09);
1440#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 9
1441
1442#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 10
1443 template <class ALLOCATOR, class Args_01,
1444 class Args_02,
1445 class Args_03,
1446 class Args_04,
1447 class Args_05,
1448 class Args_06,
1449 class Args_07,
1450 class Args_08,
1451 class Args_09,
1452 class Args_10>
1453 static void emplaceAndMoveToFront(Iterator *toBegin,
1454 Iterator fromBegin,
1455 Iterator position,
1456 ALLOCATOR allocator,
1457 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1458 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1459 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1460 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1461 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1462 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1463 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
1464 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
1465 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09,
1466 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) arguments_10);
1467#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 10
1468
1469
1470#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 0
1471 template <class ALLOCATOR>
1473 Iterator *toBegin,
1474 Iterator fromBegin,
1475 Iterator position,
1476 ALLOCATOR allocator,
1478#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 0
1479
1480#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 1
1481 template <class ALLOCATOR, class Args_01>
1483 Iterator *toBegin,
1484 Iterator fromBegin,
1485 Iterator position,
1486 ALLOCATOR allocator,
1488 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01);
1489#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 1
1490
1491#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 2
1492 template <class ALLOCATOR, class Args_01,
1493 class Args_02>
1495 Iterator *toBegin,
1496 Iterator fromBegin,
1497 Iterator position,
1498 ALLOCATOR allocator,
1500 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1501 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02);
1502#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 2
1503
1504#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 3
1505 template <class ALLOCATOR, class Args_01,
1506 class Args_02,
1507 class Args_03>
1509 Iterator *toBegin,
1510 Iterator fromBegin,
1511 Iterator position,
1512 ALLOCATOR allocator,
1514 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1515 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1516 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03);
1517#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 3
1518
1519#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 4
1520 template <class ALLOCATOR, class Args_01,
1521 class Args_02,
1522 class Args_03,
1523 class Args_04>
1525 Iterator *toBegin,
1526 Iterator fromBegin,
1527 Iterator position,
1528 ALLOCATOR allocator,
1530 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1531 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1532 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1533 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04);
1534#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 4
1535
1536#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 5
1537 template <class ALLOCATOR, class Args_01,
1538 class Args_02,
1539 class Args_03,
1540 class Args_04,
1541 class Args_05>
1543 Iterator *toBegin,
1544 Iterator fromBegin,
1545 Iterator position,
1546 ALLOCATOR allocator,
1548 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1549 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1550 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1551 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1552 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05);
1553#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 5
1554
1555#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 6
1556 template <class ALLOCATOR, class Args_01,
1557 class Args_02,
1558 class Args_03,
1559 class Args_04,
1560 class Args_05,
1561 class Args_06>
1563 Iterator *toBegin,
1564 Iterator fromBegin,
1565 Iterator position,
1566 ALLOCATOR allocator,
1568 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1569 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1570 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1571 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1572 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1573 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06);
1574#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 6
1575
1576#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 7
1577 template <class ALLOCATOR, class Args_01,
1578 class Args_02,
1579 class Args_03,
1580 class Args_04,
1581 class Args_05,
1582 class Args_06,
1583 class Args_07>
1585 Iterator *toBegin,
1586 Iterator fromBegin,
1587 Iterator position,
1588 ALLOCATOR allocator,
1590 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1591 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1592 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1593 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1594 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1595 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1596 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07);
1597#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 7
1598
1599#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 8
1600 template <class ALLOCATOR, class Args_01,
1601 class Args_02,
1602 class Args_03,
1603 class Args_04,
1604 class Args_05,
1605 class Args_06,
1606 class Args_07,
1607 class Args_08>
1609 Iterator *toBegin,
1610 Iterator fromBegin,
1611 Iterator position,
1612 ALLOCATOR allocator,
1614 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1615 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1616 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1617 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1618 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1619 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1620 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
1621 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08);
1622#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 8
1623
1624#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 9
1625 template <class ALLOCATOR, class Args_01,
1626 class Args_02,
1627 class Args_03,
1628 class Args_04,
1629 class Args_05,
1630 class Args_06,
1631 class Args_07,
1632 class Args_08,
1633 class Args_09>
1635 Iterator *toBegin,
1636 Iterator fromBegin,
1637 Iterator position,
1638 ALLOCATOR allocator,
1640 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1641 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1642 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1643 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1644 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1645 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1646 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
1647 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
1648 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09);
1649#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 9
1650
1651#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 10
1652 template <class ALLOCATOR, class Args_01,
1653 class Args_02,
1654 class Args_03,
1655 class Args_04,
1656 class Args_05,
1657 class Args_06,
1658 class Args_07,
1659 class Args_08,
1660 class Args_09,
1661 class Args_10>
1663 Iterator *toBegin,
1664 Iterator fromBegin,
1665 Iterator position,
1666 ALLOCATOR allocator,
1668 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1669 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1670 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1671 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1672 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1673 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1674 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
1675 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
1676 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09,
1677 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) arguments_10);
1678#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 10
1679
1680#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 0
1681 template <class ALLOCATOR>
1683 Iterator *toBegin,
1684 Iterator fromBegin,
1685 Iterator position,
1686 ALLOCATOR allocator,
1688#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 0
1689
1690#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 1
1691 template <class ALLOCATOR, class Args_01>
1693 Iterator *toBegin,
1694 Iterator fromBegin,
1695 Iterator position,
1696 ALLOCATOR allocator,
1698 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01);
1699#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 1
1700
1701#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 2
1702 template <class ALLOCATOR, class Args_01,
1703 class Args_02>
1705 Iterator *toBegin,
1706 Iterator fromBegin,
1707 Iterator position,
1708 ALLOCATOR allocator,
1710 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1711 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02);
1712#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 2
1713
1714#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 3
1715 template <class ALLOCATOR, class Args_01,
1716 class Args_02,
1717 class Args_03>
1719 Iterator *toBegin,
1720 Iterator fromBegin,
1721 Iterator position,
1722 ALLOCATOR allocator,
1724 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1725 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1726 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03);
1727#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 3
1728
1729#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 4
1730 template <class ALLOCATOR, class Args_01,
1731 class Args_02,
1732 class Args_03,
1733 class Args_04>
1735 Iterator *toBegin,
1736 Iterator fromBegin,
1737 Iterator position,
1738 ALLOCATOR allocator,
1740 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1741 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1742 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1743 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04);
1744#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 4
1745
1746#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 5
1747 template <class ALLOCATOR, class Args_01,
1748 class Args_02,
1749 class Args_03,
1750 class Args_04,
1751 class Args_05>
1753 Iterator *toBegin,
1754 Iterator fromBegin,
1755 Iterator position,
1756 ALLOCATOR allocator,
1758 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1759 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1760 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1761 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1762 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05);
1763#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 5
1764
1765#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 6
1766 template <class ALLOCATOR, class Args_01,
1767 class Args_02,
1768 class Args_03,
1769 class Args_04,
1770 class Args_05,
1771 class Args_06>
1773 Iterator *toBegin,
1774 Iterator fromBegin,
1775 Iterator position,
1776 ALLOCATOR allocator,
1778 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1779 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1780 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1781 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1782 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1783 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06);
1784#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 6
1785
1786#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 7
1787 template <class ALLOCATOR, class Args_01,
1788 class Args_02,
1789 class Args_03,
1790 class Args_04,
1791 class Args_05,
1792 class Args_06,
1793 class Args_07>
1795 Iterator *toBegin,
1796 Iterator fromBegin,
1797 Iterator position,
1798 ALLOCATOR allocator,
1800 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1801 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1802 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1803 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1804 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1805 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1806 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07);
1807#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 7
1808
1809#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 8
1810 template <class ALLOCATOR, class Args_01,
1811 class Args_02,
1812 class Args_03,
1813 class Args_04,
1814 class Args_05,
1815 class Args_06,
1816 class Args_07,
1817 class Args_08>
1819 Iterator *toBegin,
1820 Iterator fromBegin,
1821 Iterator position,
1822 ALLOCATOR allocator,
1824 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1825 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1826 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1827 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1828 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1829 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1830 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
1831 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08);
1832#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 8
1833
1834#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 9
1835 template <class ALLOCATOR, class Args_01,
1836 class Args_02,
1837 class Args_03,
1838 class Args_04,
1839 class Args_05,
1840 class Args_06,
1841 class Args_07,
1842 class Args_08,
1843 class Args_09>
1845 Iterator *toBegin,
1846 Iterator fromBegin,
1847 Iterator position,
1848 ALLOCATOR allocator,
1850 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1851 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1852 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1853 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1854 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1855 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1856 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
1857 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
1858 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09);
1859#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 9
1860
1861#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 10
1862 template <class ALLOCATOR, class Args_01,
1863 class Args_02,
1864 class Args_03,
1865 class Args_04,
1866 class Args_05,
1867 class Args_06,
1868 class Args_07,
1869 class Args_08,
1870 class Args_09,
1871 class Args_10>
1873 Iterator *toBegin,
1874 Iterator fromBegin,
1875 Iterator position,
1876 ALLOCATOR allocator,
1878 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1879 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1880 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1881 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1882 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1883 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
1884 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
1885 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
1886 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09,
1887 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) arguments_10);
1888#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 10
1889
1890#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 0
1891 template <class ALLOCATOR>
1893 Iterator *toBegin,
1894 Iterator fromBegin,
1895 Iterator position,
1896 ALLOCATOR allocator,
1898#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 0
1899
1900#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 1
1901 template <class ALLOCATOR, class Args_01>
1903 Iterator *toBegin,
1904 Iterator fromBegin,
1905 Iterator position,
1906 ALLOCATOR allocator,
1908 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01);
1909#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 1
1910
1911#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 2
1912 template <class ALLOCATOR, class Args_01,
1913 class Args_02>
1915 Iterator *toBegin,
1916 Iterator fromBegin,
1917 Iterator position,
1918 ALLOCATOR allocator,
1920 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1921 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02);
1922#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 2
1923
1924#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 3
1925 template <class ALLOCATOR, class Args_01,
1926 class Args_02,
1927 class Args_03>
1929 Iterator *toBegin,
1930 Iterator fromBegin,
1931 Iterator position,
1932 ALLOCATOR allocator,
1934 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1935 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1936 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03);
1937#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 3
1938
1939#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 4
1940 template <class ALLOCATOR, class Args_01,
1941 class Args_02,
1942 class Args_03,
1943 class Args_04>
1945 Iterator *toBegin,
1946 Iterator fromBegin,
1947 Iterator position,
1948 ALLOCATOR allocator,
1950 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1951 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1952 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1953 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04);
1954#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 4
1955
1956#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 5
1957 template <class ALLOCATOR, class Args_01,
1958 class Args_02,
1959 class Args_03,
1960 class Args_04,
1961 class Args_05>
1963 Iterator *toBegin,
1964 Iterator fromBegin,
1965 Iterator position,
1966 ALLOCATOR allocator,
1968 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1969 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1970 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1971 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1972 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05);
1973#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 5
1974
1975#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 6
1976 template <class ALLOCATOR, class Args_01,
1977 class Args_02,
1978 class Args_03,
1979 class Args_04,
1980 class Args_05,
1981 class Args_06>
1983 Iterator *toBegin,
1984 Iterator fromBegin,
1985 Iterator position,
1986 ALLOCATOR allocator,
1988 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
1989 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
1990 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
1991 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
1992 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
1993 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06);
1994#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 6
1995
1996#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 7
1997 template <class ALLOCATOR, class Args_01,
1998 class Args_02,
1999 class Args_03,
2000 class Args_04,
2001 class Args_05,
2002 class Args_06,
2003 class Args_07>
2005 Iterator *toBegin,
2006 Iterator fromBegin,
2007 Iterator position,
2008 ALLOCATOR allocator,
2010 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
2011 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
2012 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
2013 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
2014 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
2015 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
2016 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07);
2017#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 7
2018
2019#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 8
2020 template <class ALLOCATOR, class Args_01,
2021 class Args_02,
2022 class Args_03,
2023 class Args_04,
2024 class Args_05,
2025 class Args_06,
2026 class Args_07,
2027 class Args_08>
2029 Iterator *toBegin,
2030 Iterator fromBegin,
2031 Iterator position,
2032 ALLOCATOR allocator,
2034 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
2035 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
2036 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
2037 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
2038 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
2039 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
2040 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
2041 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08);
2042#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 8
2043
2044#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 9
2045 template <class ALLOCATOR, class Args_01,
2046 class Args_02,
2047 class Args_03,
2048 class Args_04,
2049 class Args_05,
2050 class Args_06,
2051 class Args_07,
2052 class Args_08,
2053 class Args_09>
2055 Iterator *toBegin,
2056 Iterator fromBegin,
2057 Iterator position,
2058 ALLOCATOR allocator,
2060 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
2061 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
2062 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
2063 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
2064 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
2065 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
2066 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
2067 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
2068 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09);
2069#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 9
2070
2071#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 10
2072 template <class ALLOCATOR, class Args_01,
2073 class Args_02,
2074 class Args_03,
2075 class Args_04,
2076 class Args_05,
2077 class Args_06,
2078 class Args_07,
2079 class Args_08,
2080 class Args_09,
2081 class Args_10>
2083 Iterator *toBegin,
2084 Iterator fromBegin,
2085 Iterator position,
2086 ALLOCATOR allocator,
2088 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
2089 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
2090 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
2091 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
2092 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
2093 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
2094 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
2095 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
2096 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09,
2097 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) arguments_10);
2098#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_A >= 10
2099
2100#else
2101// The generated code below is a workaround for the absence of perfect
2102// forwarding in some compilers.
2103 template <class ALLOCATOR, class... Args>
2104 static void emplaceAndMoveToBack(Iterator *toEnd,
2105 Iterator fromEnd,
2106 Iterator position,
2107 ALLOCATOR allocator,
2108 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... arguments);
2109
2110 template <class ALLOCATOR, class... Args>
2111 static void emplaceAndMoveToBackDispatch(
2112 Iterator *toEnd,
2113 Iterator fromEnd,
2114 Iterator position,
2115 ALLOCATOR allocator,
2117 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... arguments);
2118 template <class ALLOCATOR, class... Args>
2119 static void emplaceAndMoveToBackDispatch(
2120 Iterator *toEnd,
2121 Iterator fromEnd,
2122 Iterator position,
2123 ALLOCATOR allocator,
2125 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... arguments);
2126 template <class ALLOCATOR, class... Args>
2127 static void emplaceAndMoveToBackDispatch(
2128 Iterator *toEnd,
2129 Iterator fromEnd,
2130 Iterator position,
2131 ALLOCATOR allocator,
2133 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... arguments);
2134
2135 template <class ALLOCATOR, class... Args>
2136 static void emplaceAndMoveToFront(Iterator *toBegin,
2137 Iterator fromBegin,
2138 Iterator position,
2139 ALLOCATOR allocator,
2140 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... arguments);
2141
2142 template <class ALLOCATOR, class... Args>
2144 Iterator *toBegin,
2145 Iterator fromBegin,
2146 Iterator position,
2147 ALLOCATOR allocator,
2149 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... arguments);
2150 template <class ALLOCATOR, class... Args>
2152 Iterator *toBegin,
2153 Iterator fromBegin,
2154 Iterator position,
2155 ALLOCATOR allocator,
2157 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... arguments);
2158 template <class ALLOCATOR, class... Args>
2160 Iterator *toBegin,
2161 Iterator fromBegin,
2162 Iterator position,
2163 ALLOCATOR allocator,
2165 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... arguments);
2166// }}} END GENERATED CODE
2167#endif
2168
2169 /// Move the specified `numElements` from the specified `source` to the
2170 /// specified `destination` using `std::memmove`. Also load into
2171 /// `destination` the value `destination - numElements` and `source` the
2172 /// value `source - numElements`. The behavior is undefined unless
2173 /// `destination >= source`.
2174 static void moveBack(Iterator *destination,
2175 Iterator *source,
2176 size_type numElements);
2177
2178 /// Move the specified `numElements` from the specified `source` to the
2179 /// specified `destination` using `std::memmove`. Also load into
2180 /// `destination` the value `destination + numElements` and `source` the
2181 /// the value `source + numElements`. The behavior is undefined unless
2182 /// `destination <= source`.
2183 static void moveFront(Iterator *destination,
2184 Iterator *source,
2185 size_type numElements);
2186
2187 /// Append the specified `numElements` copies of the specified `value`
2188 /// to the deque ending at the specified `fromEnd` iterator, passing the
2189 /// specified `allocator` through to the new elements, and load into the
2190 /// specified `toEnd` an iterator pointing to the end of the data after
2191 /// appending (i.e., `fromEnd + numElements`). The behavior is
2192 /// undefined unless `fromEnd + numElements` is a valid iterator (i.e.,
2193 /// the block pointer array holds enough room after the `fromEnd`
2194 /// position to insert `numElements`).
2195 template <class ALLOCATOR>
2196 static void uninitializedFillNBack(Iterator *toEnd,
2197 Iterator fromEnd,
2198 size_type numElements,
2199 const VALUE_TYPE& value,
2200 ALLOCATOR allocator);
2201
2202 /// Prepend the specified `numElements` copies of the specified `value`
2203 /// to the deque starting at the specified `fromBegin` iterator, passing
2204 /// the specified `allocator` through to the new elements, and load into
2205 /// the specified `toBegin` an iterator pointing to the end of the data
2206 /// after prepending, i.e., `fromBegin - numElements`. The behavior is
2207 /// undefined unless `fromBegin - numElements` is a valid iterator
2208 /// (i.e., the block pointer array holds enough room before the
2209 /// `fromBegin` position to insert `numElements`).
2210 template <class ALLOCATOR>
2211 static void uninitializedFillNFront(Iterator *toBegin,
2212 Iterator fromBegin,
2213 size_type numElements,
2214 const VALUE_TYPE& value,
2215 ALLOCATOR allocator);
2216
2217 /// Append the specified `numElements` value-initialized objects to the
2218 /// deque ending at the specified `fromEnd` iterator, passing the
2219 /// specified `allocator` through to the new elements, and load into the
2220 /// specified `toEnd` an iterator pointing to the end of the data after
2221 /// appending (i.e., `fromEnd + numElements`). The behavior is
2222 /// undefined unless `fromEnd + numElements` is a valid iterator (i.e.,
2223 /// the block pointer array holds enough room after the `fromEnd`
2224 /// position to insert `numElements`).
2225 template <class ALLOCATOR>
2226 static void valueInititalizeN(Iterator *toEnd,
2227 Iterator fromEnd,
2228 size_type numElements,
2229 ALLOCATOR allocator);
2230};
2231
2232// PARTIAL SPECIALIZATION
2233
2234/// This is a partial specialization of `DequePrimitives` for the case when
2235/// there is a single element per block.
2236template <class VALUE_TYPE>
2237struct DequePrimitives<VALUE_TYPE, 1> {
2238
2239 // PUBLIC TYPES
2240 typedef std::size_t size_type;
2241 typedef DequeImpUtil<VALUE_TYPE, 1> ImpUtil;
2242 typedef DequeIterator<VALUE_TYPE, 1> Iterator;
2243
2244 // CLASS METHODS
2245 template <class ALLOCATOR>
2246 static void destruct(Iterator begin, Iterator end, ALLOCATOR allocator);
2247
2248 template <class ALLOCATOR>
2249 static Iterator erase(Iterator *toBegin,
2250 Iterator *toEnd,
2251 Iterator fromBegin,
2252 Iterator first,
2253 Iterator last,
2254 Iterator fromEnd,
2255 ALLOCATOR allocator);
2256
2257 template <class ALLOCATOR>
2258 static void insertAndMoveToBack(Iterator *toEnd,
2259 Iterator fromEnd,
2260 Iterator position,
2261 size_type numElements,
2262 const VALUE_TYPE& value,
2263 ALLOCATOR allocator);
2264
2265 template <class FWD_ITER, class ALLOCATOR>
2266 static void insertAndMoveToBack(Iterator *toEnd,
2267 Iterator fromEnd,
2268 Iterator position,
2269 FWD_ITER first,
2270 FWD_ITER last,
2271 size_type numElements,
2272 ALLOCATOR allocator);
2273
2274 template <class ALLOCATOR>
2275 static void insertAndMoveToFront(Iterator *toBegin,
2276 Iterator fromBegin,
2277 Iterator position,
2278 size_type numElements,
2279 const VALUE_TYPE& value,
2280 ALLOCATOR allocator);
2281
2282 template <class FWD_ITER, class ALLOCATOR>
2283 static void insertAndMoveToFront(Iterator *toBegin,
2284 Iterator fromBegin,
2285 Iterator position,
2286 FWD_ITER first,
2287 FWD_ITER last,
2288 size_type numElements,
2289 ALLOCATOR allocator);
2290
2291 template <class ALLOCATOR>
2292 static void uninitializedFillNBack(Iterator *toEnd,
2293 Iterator fromEnd,
2294 size_type numElements,
2295 const VALUE_TYPE& value,
2296 ALLOCATOR allocator);
2297 template <class ALLOCATOR>
2298static void uninitializedFillNBack(
2299 Iterator *toEnd,
2300 Iterator fromEnd,
2301 size_type numElements,
2302 const VALUE_TYPE& value,
2303 ALLOCATOR allocator,
2305 template <class ALLOCATOR>
2306 static void uninitializedFillNBack(
2307 Iterator *toEnd,
2308 Iterator fromEnd,
2309 size_type numElements,
2310 const VALUE_TYPE& value,
2311 ALLOCATOR allocator,
2313
2314 template <class ALLOCATOR>
2315 static void uninitializedFillNFront(Iterator *toBegin,
2316 Iterator fromBegin,
2317 size_type numElements,
2318 const VALUE_TYPE& value,
2319 ALLOCATOR allocator);
2320 template <class ALLOCATOR>
2321 static void uninitializedFillNFront(
2322 Iterator *toBegin,
2323 Iterator fromBegin,
2324 size_type numElements,
2325 const VALUE_TYPE& value,
2326 ALLOCATOR allocator,
2328 template <class ALLOCATOR>
2329 static void uninitializedFillNFront(
2330 Iterator *toBegin,
2331 Iterator fromBegin,
2332 size_type numElements,
2333 const VALUE_TYPE& value,
2334 ALLOCATOR allocator,
2336
2337 template <class ALLOCATOR>
2338 static void valueInititalizeN(Iterator *toEnd,
2339 Iterator fromEnd,
2340 size_type numElements,
2341 ALLOCATOR allocator);
2342
2343 template <class ALLOCATOR>
2344 static void valueInititalizeN(
2345 Iterator *toEnd,
2346 Iterator fromEnd,
2347 size_type numElements,
2348 ALLOCATOR allocator,
2350
2351 template <class ALLOCATOR>
2352 static void valueInititalizeN(
2353 Iterator *toEnd,
2354 Iterator fromEnd,
2355 size_type numElements,
2356 ALLOCATOR allocator,
2358};
2359
2360 // =======================================
2361 // class DequePrimitives_DequeElementGuard
2362 // =======================================
2363
2364/// This `class` provides a specialized proctor object that, upon
2365/// destruction and unless the `release` method has been called, destroys
2366/// the elements in a segment of a deque of parameterized `VALUE_TYPE`. The
2367/// elements destroyed are delimited by the "guarded" range
2368/// `[d_begin .. d_end)`.
2369///
2370/// See @ref bslalg_dequeprimitives_cpp03
2371template <class VALUE_TYPE, int BLOCK_LENGTH, class ALLOCATOR>
2372class DequePrimitives_DequeElementGuard {
2373
2374 public:
2375 // PUBLIC TYPES
2376 typedef DequeIterator<VALUE_TYPE, BLOCK_LENGTH> Iterator;
2377
2378 private:
2379 // DATA
2380 Iterator d_begin; // iterator of first element in guarded range
2381 Iterator d_end; // iterator beyond last element in guarded range
2382 ALLOCATOR d_allocator;
2383
2384 private:
2385 // NOT IMPLEMENTED
2386 DequePrimitives_DequeElementGuard(
2387 const DequePrimitives_DequeElementGuard&);
2388 DequePrimitives_DequeElementGuard& operator=(
2389 const DequePrimitives_DequeElementGuard&);
2390
2391 public:
2392 // CREATORS
2393
2394 /// Create a deque exception guard object for the sequence of elements
2395 /// of the parameterized `VALUE_TYPE` delimited by the specified range
2396 /// `[begin .. end)`. The behavior is undefined unless `begin <= end`
2397 /// and unless each element in the range `[begin .. end)` has been
2398 /// initialized.
2399 DequePrimitives_DequeElementGuard(const Iterator& begin,
2400 const Iterator& end,
2401 ALLOCATOR allocator);
2402
2403 /// Call the destructor on each of the elements of the parameterized
2404 /// `VALUE_TYPE` delimited by the range `[begin .. end)` and destroy
2405 /// this array exception guard.
2407
2408 // MANIPULATORS
2409
2410 /// Move the begin iterator by the specified `offset`, and return the
2411 /// new begin iterator.
2412 Iterator& moveBegin(std::ptrdiff_t offset = -1);
2413
2414 /// Move the end pointer by the specified `offset`, and return the new
2415 /// end pointer.
2416 Iterator& moveEnd(std::ptrdiff_t offset = 1);
2417
2418 /// Set the range of elements guarded by this object to be empty. Note
2419 /// that `d_begin == d_end` following this operation, but the specific
2420 /// value is unspecified.
2421 void release();
2422};
2423
2424 // ===============================================
2425 // class DequePrimitives_ExternalDequeElementGuard
2426 // ===============================================
2427
2428/// This `class` provides a specialized proctor object that, upon
2429/// destruction and unless the `release` method has been called, destroys
2430/// the elements in a segment of a `bsl::deque` of parameterized type
2431/// `VALUE_TYPE`. The elements destroyed are delimited by the "guarded"
2432/// range `[*d_begin .. *d_end)`. Note that the range guarded by this
2433/// `class` is dynamic and can be changed outside of this `class`.
2434///
2435/// See @ref bslalg_dequeprimitives_cpp03
2436template <class VALUE_TYPE, int BLOCK_LENGTH, class ALLOCATOR>
2437class DequePrimitives_ExternalDequeElementGuard {
2438
2439 public:
2440 // PUBLIC TYPES
2441 typedef DequeIterator<VALUE_TYPE, BLOCK_LENGTH> Iterator;
2442
2443 private:
2444 // DATA
2445 Iterator *d_begin_p; // pointer to iterator of first element in guarded
2446 // range
2447
2448 Iterator *d_end_p; // pointer to iterator beyond last element in
2449 // guarded range
2450 ALLOCATOR d_allocator;
2451
2452 private:
2453 // NOT IMPLEMENTED
2454 DequePrimitives_ExternalDequeElementGuard(
2455 const DequePrimitives_ExternalDequeElementGuard&);
2456 DequePrimitives_ExternalDequeElementGuard& operator=(
2457 const DequePrimitives_ExternalDequeElementGuard&);
2458
2459 public:
2460 // CREATORS
2461
2462 /// Create a deque exception guard object for the sequence of elements
2463 /// of the parameterized `VALUE_TYPE` delimited by the specified range
2464 /// `[*begin .. *end)`. The behavior is undefined unless `*begin` <=
2465 /// `*end` and unless each element in the range `[*begin .. *end)` has
2466 /// been initialized.
2467 DequePrimitives_ExternalDequeElementGuard(Iterator *begin,
2468 Iterator *end,
2469 ALLOCATOR allocator);
2470
2471 /// Call the destructor on each of the elements of the parameterized
2472 /// `VALUE_TYPE` delimited by the range `[*d_begin_p .. *d_end_p)` and
2473 /// destroy this array exception guard.
2475
2476 // MANIPULATORS
2477
2478 /// Set the range of elements guarded by this object to be empty. Note
2479 /// that `d_begin_p == d_end_p == 0` following this operation.
2480 void release();
2481};
2482
2483 // ====================================
2484 // class DequePrimitives_DequeMoveGuard
2485 // ====================================
2486
2487/// This `class` provides a guard object that, upon destruction and unless
2488/// the `release` method has been called, uses `moveBack` or `moveFront` to
2489/// move the "guarded" range `[d_source_p .. d_source_p + d_size - 1]`
2490/// back to `[d_destination_p .. d_destination_p + d_size -1]`.
2491///
2492/// See @ref bslalg_dequeprimitives_cpp03
2493template <class VALUE_TYPE, int BLOCK_LENGTH>
2494class DequePrimitives_DequeMoveGuard {
2495
2496 public:
2497 // PUBLIC TYPES
2498 typedef DequeIterator<VALUE_TYPE, BLOCK_LENGTH> Iterator;
2500
2501 private:
2502 // DATA
2503 Iterator d_destination_p; // destination of the move
2504 Iterator d_source_p; // source of the move
2505 std::size_t d_size; // size of the range being guarded
2506 bool d_front; // whether to use 'moveFront'
2507
2508 private:
2509 // NOT IMPLEMENTED
2510 DequePrimitives_DequeMoveGuard(const DequePrimitives_DequeMoveGuard&);
2511 DequePrimitives_DequeMoveGuard& operator=(
2512 const DequePrimitives_DequeMoveGuard&);
2513
2514 public:
2515 // CREATORS
2516
2517 /// Create a guard object that will call `moveBack` or `moveFront`,
2518 /// depending on the specified `isFront`, on the specified `size`
2519 /// elements from `src` to `dest` upon destruction unless `release` has
2520 /// been called.
2521 DequePrimitives_DequeMoveGuard(Iterator dest,
2522 Iterator src,
2523 std::size_t size,
2524 bool isFront);
2525
2526 /// Call either `moveBack` or `moveFront` depending on `d_front` upon
2527 /// destruction unless `release` has been called before this.
2529
2530 // MANIPULATORS
2531
2532 /// Set the size of the range guarded by this object to be zero.
2533 void release();
2534};
2535
2536 // ==========================================
2537 // class DequePrimitives_DequeEndpointProctor
2538 // ==========================================
2539
2540/// This class implements a proctor that, upon destruction and unless its
2541/// `release` method has previously been invoked, sets a deque endpoint
2542/// (i.e., "start" or "finish" iterator) to a position within the deque.
2543/// Both the endpoint and position are supplied at construction. See
2544/// `emplaceAndMoveToBack` and `emplaceAndMoveToFront` for use cases.
2545///
2546/// See @ref bslalg_dequeprimitives_cpp03
2547template <class VALUE_TYPE, int BLOCK_LENGTH>
2548class DequePrimitives_DequeEndpointProctor {
2549
2550 public:
2551 // PUBLIC TYPES
2552 typedef DequeIterator<VALUE_TYPE, BLOCK_LENGTH> Iterator;
2553
2554 private:
2555 // DATA
2556 Iterator *d_endpoint_p; // proctored endpoint of a deque
2557 Iterator d_position; // set endpoint to this upon destruction
2558
2559 private:
2560 // NOT IMPLEMENTED
2561 DequePrimitives_DequeEndpointProctor(
2562 const DequePrimitives_DequeEndpointProctor&);
2563 DequePrimitives_DequeEndpointProctor& operator=(
2564 const DequePrimitives_DequeEndpointProctor&);
2565
2566 public:
2567 // CREATORS
2568
2569 /// Create a deque endpoint proctor that conditionally manages the
2570 /// specified `endpoint` (if non-zero) by setting `*endpoint` to the
2571 /// specified `position` (if not released -- see `release`) upon
2572 /// destruction.
2573 DequePrimitives_DequeEndpointProctor(Iterator *endpoint,
2574 Iterator position);
2575
2576 /// Destroy this endpoint proctor, and set the deque endpoint it manages
2577 /// (if any) to the position supplied at construction. If no endpoint
2578 /// is currently being managed, this method has no effect.
2580
2581 // MANIPULATORS
2582
2583 /// Release from management the deque endpoint currently managed by this
2584 /// proctor. If no endpoint is currently being managed, this method has
2585 /// no effect.
2586 void release();
2587};
2588
2589// ============================================================================
2590// INLINE FUNCTION DEFINITIONS
2591// ============================================================================
2592
2593 // ---------------------
2594 // class DequePrimitives
2595 // ---------------------
2596
2597// CLASS METHODS
2598template <class VALUE_TYPE, int BLOCK_LENGTH>
2599template <class ALLOCATOR>
2600inline
2602 Iterator end,
2603 ALLOCATOR allocator)
2604{
2605 enum {
2607
2608 VALUE = IS_BITWISECOPYABLE
2609 ? BITWISE_COPYABLE_TRAITS
2610 : NIL_TRAITS
2611 };
2612
2613 return destruct(begin,
2614 end,
2615 allocator,
2617}
2618
2619template <class VALUE_TYPE, int BLOCK_LENGTH>
2620template <class ALLOCATOR>
2622 Iterator,
2623 Iterator,
2624 ALLOCATOR,
2626{
2627 // No-op.
2628}
2629
2630template <class VALUE_TYPE, int BLOCK_LENGTH>
2631template <class ALLOCATOR>
2633 Iterator begin,
2634 Iterator end,
2635 ALLOCATOR allocator,
2637{
2638 for (; !(begin == end); ++begin) {
2640 begin.valuePtr());
2641 }
2642}
2643
2644template <class VALUE_TYPE, int BLOCK_LENGTH>
2645template <class ALLOCATOR>
2646inline
2647typename
2650 Iterator *toEnd,
2651 Iterator fromBegin,
2652 Iterator first,
2653 Iterator last,
2654 Iterator fromEnd,
2655 ALLOCATOR allocator)
2656{
2657 enum {
2659
2660 VALUE = IS_BITWISECOPYABLE
2661 ? BITWISE_COPYABLE_TRAITS
2662 : NIL_TRAITS
2663 };
2664
2665 return erase(toBegin,
2666 toEnd,
2667 fromBegin,
2668 first,
2669 last,
2670 fromEnd,
2671 allocator,
2673}
2674
2675template <class VALUE_TYPE, int BLOCK_LENGTH>
2676template <class ALLOCATOR>
2677typename
2680 Iterator *toBegin,
2681 Iterator *toEnd,
2682 Iterator fromBegin,
2683 Iterator first,
2684 Iterator last,
2685 Iterator fromEnd,
2686 ALLOCATOR allocator,
2688{
2689 if (first == last) { // Nothing to delete, bail out fast
2690 *toBegin = fromBegin;
2691 *toEnd = fromEnd;
2692 return first; // RETURN
2693 }
2694
2695 size_type frontSize = first - fromBegin;
2696 size_type backSize = fromEnd - last;
2697 Iterator ret;
2698
2699 if (frontSize < backSize) {
2700 ret = last;
2701 for (; 0 < frontSize; --frontSize) {
2702 --last;
2703 --first;
2704 *last = MoveUtil::move(*first);
2705 }
2706 *toBegin = last;
2707 *toEnd = fromEnd;
2708 }
2709 else {
2710 ret = first;
2711 for (; 0 < backSize; --backSize, ++first, ++last) {
2712 *first = MoveUtil::move(*last);
2713 }
2714 *toBegin = fromBegin;
2715 *toEnd = first;
2716 }
2717 destruct(first, last, allocator);
2718 return ret;
2719}
2720
2721template <class VALUE_TYPE, int BLOCK_LENGTH>
2722template <class ALLOCATOR>
2723typename
2726 Iterator *toBegin,
2727 Iterator *toEnd,
2728 Iterator fromBegin,
2729 Iterator first,
2730 Iterator last,
2731 Iterator fromEnd,
2732 ALLOCATOR,
2734{
2735 size_type frontSize = first - fromBegin;
2736 size_type backSize = fromEnd - last;
2737 Iterator ret;
2738
2739 if (frontSize < backSize) {
2740 ret = last;
2741 moveBack(&last, &first, frontSize);
2742 *toBegin = last;
2743 *toEnd = fromEnd;
2744 }
2745 else {
2746 ret = first;
2747 moveFront(&first, &last, backSize);
2748 *toBegin = fromBegin;
2749 *toEnd = first;
2750 }
2751 // 'destruct' is no-op for types with 'BITWISE_COPYABLE_TRAITS'.
2752 return ret;
2753}
2754
2755template <class VALUE_TYPE, int BLOCK_LENGTH>
2756template <class ALLOCATOR>
2757inline
2758void
2759DequePrimitives<VALUE_TYPE, BLOCK_LENGTH>
2760 ::insertAndMoveToBack(Iterator *toEnd,
2761 Iterator fromEnd,
2762 Iterator position,
2763 size_type numElements,
2764 const VALUE_TYPE& value,
2765 ALLOCATOR allocator)
2766{
2767 enum {
2770
2771 VALUE = IS_BITWISECOPYABLE
2772 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
2773 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
2774 };
2775
2776 insertAndMoveToBack(toEnd,
2777 fromEnd,
2778 position,
2779 numElements,
2780 value,
2781 allocator,
2783}
2784
2785template <class VALUE_TYPE, int BLOCK_LENGTH>
2786template <class ALLOCATOR>
2787void
2789 Iterator *toEnd,
2790 Iterator fromEnd,
2791 Iterator position,
2792 size_type numElements,
2793 const VALUE_TYPE& value,
2794 ALLOCATOR allocator,
2796{
2797 size_type backSize = fromEnd - position;
2798 Iterator end = fromEnd;
2799 Iterator dest = end + numElements;
2800
2803 BSLS_UTIL_ADDRESSOF(space.object()),
2805 value);
2807 temp(BSLS_UTIL_ADDRESSOF(space.object()));
2808
2809 // TBD: this does the same thing as the old code - don't like that we
2810 // circumvent the whole allocator thing, but for now, let's keep it
2811 // consistent.
2812 // ConstructorProxy<VALUE_TYPE>
2813 // tempValue(value, bslma::Default::allocator());
2814
2815 // No guard needed since all the operations won't throw due to the
2816 // bitwise-copyable trait
2817 moveBack(&dest, &end, backSize);
2818 uninitializedFillNFront(&dest, dest, numElements, space.object(),
2819 allocator);
2820
2821 *toEnd = fromEnd + numElements;
2822}
2823
2824template <class VALUE_TYPE, int BLOCK_LENGTH>
2825template <class ALLOCATOR>
2826void
2828 Iterator *toEnd,
2829 Iterator fromEnd,
2830 Iterator position,
2831 size_type numElements,
2832 const VALUE_TYPE& value,
2833 ALLOCATOR allocator,
2835{
2836 typedef DequePrimitives_ExternalDequeElementGuard<VALUE_TYPE,
2837 BLOCK_LENGTH,
2838 ALLOCATOR> ExtGuard;
2839
2840
2841 size_type backSize = fromEnd - position;
2842 Iterator end = fromEnd;
2843 Iterator dest = end + numElements;
2844
2845 // In case of aliasing, make a copy of the value.
2848 BSLS_UTIL_ADDRESSOF(space.object()),
2850 value);
2852 temp(BSLS_UTIL_ADDRESSOF(space.object()));
2853
2854 // TBD: this does the same thing as the old code - don't like that we
2855 // circumvent the whole allocator thing, but for now, let's keep it
2856 // consistent.
2857 // ConstructorProxy<VALUE_TYPE>
2858 // tempValue(value, bslma::Default::allocator());
2859
2860 // Setup a reverse guard that will reverse the moveBack operation in case
2861 // of an exception.
2862 MoveGuard guard(end, dest, backSize, false);
2863
2864 moveBack(&dest, &end, backSize);
2865
2866 // Create a guard for 'uninitializedFillNBack' because it can throw under
2867 // 'bitwisemoveable' trait. Need to use this special guard because
2868 // uninitializedFillNFront is not exception safe.
2869 Iterator dest2(dest);
2870 ExtGuard eguard(&dest, &dest2, allocator);
2871
2872 uninitializedFillNFront(&dest, dest, numElements, space.object(),
2873 allocator);
2874 eguard.release();
2875 guard.release();
2876 *toEnd = fromEnd + numElements;
2877}
2878
2879template <class VALUE_TYPE, int BLOCK_LENGTH>
2880template <class ALLOCATOR>
2881void
2883 Iterator *toEnd,
2884 Iterator fromEnd,
2885 Iterator position,
2886 size_type numElements,
2887 const VALUE_TYPE& value,
2888 ALLOCATOR allocator,
2890{
2891 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
2892 BLOCK_LENGTH,
2893 ALLOCATOR> ElementGuard;
2894
2895 size_type backSize = fromEnd - position;
2896 Iterator end = fromEnd;
2897 Iterator dest = end + numElements;
2898 size_type numDest;
2899
2900 // In case of aliasing, make a copy of the value.
2901
2905 value);
2907 temp(BSLS_UTIL_ADDRESSOF(space.object()));
2908
2909 // TBD: this does the same thing as the old code - don't like that we
2910 // circumvent the whole allocator thing, but for now, let's keep it
2911 // consistent.
2912 // ConstructorProxy<VALUE_TYPE> tempValue(value,
2913 // bslma::Default::allocator());
2914
2915 ElementGuard guard(dest, dest, allocator);
2916 if (backSize >= numElements) {
2917 for (numDest = numElements; 0 < numDest; --numDest) {
2918 --dest;
2919 --end;
2921 dest.valuePtr(),
2922 *end);
2923 guard.moveBegin(-1);
2924 }
2925 for (backSize -= numElements; 0 < backSize; --backSize) {
2926 --dest;
2927 --end;
2928 *dest = *end;
2929 }
2930 for (numDest = numElements; 0 < numDest; --numDest, ++position) {
2931 *position = space.object();
2932 }
2933 } else {
2934 for (numDest = backSize; 0 < numDest; --numDest) {
2935 --dest;
2936 --end;
2938 dest.valuePtr(),
2939 *end);
2940 guard.moveBegin(-1);
2941 }
2942 for (numDest = numElements; backSize < numDest; --numDest) {
2943 --dest;
2945 dest.valuePtr(),
2946 space.object());
2947
2948 guard.moveBegin(-1);
2949 }
2950 for (; 0 < numDest; --numDest, ++position) {
2951 *position = space.object();
2952 }
2953 }
2954 guard.release();
2955
2956 *toEnd = fromEnd + numElements;
2957}
2958
2959template <class VALUE_TYPE, int BLOCK_LENGTH>
2960template <class FWD_ITER, class ALLOCATOR>
2961void
2962DequePrimitives<VALUE_TYPE, BLOCK_LENGTH>
2963 ::insertAndMoveToBack(Iterator *toEnd,
2964 Iterator fromEnd,
2965 Iterator position,
2966 FWD_ITER first,
2967 FWD_ITER /*last*/,
2968 size_type numElements,
2969 ALLOCATOR allocator)
2970{
2971 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
2972 BLOCK_LENGTH,
2973 ALLOCATOR> ElementGuard;
2974
2975 size_type backSize = fromEnd - position;
2976 Iterator end = fromEnd;
2977 Iterator dest = end + numElements;
2978 size_type numDest;
2979
2980 ElementGuard guard(dest, dest, allocator);
2981 if (backSize >= numElements) {
2982 for (numDest = numElements; 0 < numDest; --numDest) {
2983 --dest;
2984 --end;
2986 dest.valuePtr(),
2987 *end);
2988 guard.moveBegin(-1);
2989 }
2990 for (numDest = backSize; numElements < numDest; --numDest) {
2991 --dest;
2992 --end;
2993 *dest = *end;
2994 }
2995 for (; 0 < numDest; ++first, ++position, --numDest) {
2996 *position = *first;
2997 }
2998 } else {
2999 for (numDest = backSize; 0 < numDest; --numDest) {
3000 --dest;
3001 --end;
3003 dest.valuePtr(),
3004 *end);
3005 guard.moveBegin(-1);
3006 }
3007 for (numDest = backSize; 0 < numDest; --numDest, ++position, ++first) {
3008 *position = *first;
3009 }
3010 // Second guard needed because we're guarding from a different range.
3011 ElementGuard guard2(position, position, allocator);
3012 for (numDest = numElements; backSize < numDest; ++first, ++position,
3013 --numDest) {
3015 position.valuePtr(),
3016 *first);
3017 guard2.moveEnd(1);
3018 }
3019 guard2.release();
3020 }
3021 guard.release();
3022 *toEnd = fromEnd + numElements;
3023}
3024
3025template <class VALUE_TYPE, int BLOCK_LENGTH>
3026template <class ALLOCATOR>
3027inline
3028void
3030 Iterator *toEnd,
3031 Iterator fromEnd,
3032 Iterator position,
3034 ALLOCATOR allocator)
3035{
3036 enum {
3039
3040 VALUE = IS_BITWISECOPYABLE
3041 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
3042 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
3043 };
3044
3045 VALUE_TYPE& lvalue = value;
3046
3047 moveInsertAndMoveToBack(toEnd,
3048 fromEnd,
3049 position,
3050 MoveUtil::move(lvalue),
3051 allocator,
3053}
3054
3055template <class VALUE_TYPE, int BLOCK_LENGTH>
3056template <class ALLOCATOR>
3057void
3059 Iterator *toEnd,
3060 Iterator fromEnd,
3061 Iterator position,
3063 ALLOCATOR allocator,
3065{
3066 const size_type backSize = fromEnd - position;
3067 Iterator end = fromEnd;
3068 Iterator dest = end + 1;
3069
3070 // No guard needed since no operations will throw with
3071 // 'BITWISE_COPYABLE_TRAITS'.
3072
3073 moveBack(&dest, &end, backSize);
3074 --dest;
3075
3076 VALUE_TYPE& lvalue = value;
3078 dest.valuePtr(),
3079 MoveUtil::move(lvalue));
3080
3081 *toEnd = fromEnd + 1;
3082}
3083
3084template <class VALUE_TYPE, int BLOCK_LENGTH>
3085template <class ALLOCATOR>
3086void
3088 Iterator *toEnd,
3089 Iterator fromEnd,
3090 Iterator position,
3092 ALLOCATOR allocator,
3094{
3095 const size_type backSize = fromEnd - position;
3096 Iterator end = fromEnd;
3097 Iterator dest = end + 1;
3098
3099 // Create a reverse guard that will undo the 'moveBack' operation in case
3100 // of an exception.
3101
3102 MoveGuard guard(end, dest, backSize, false);
3103
3104 moveBack(&dest, &end, backSize);
3105 --dest;
3106
3107 VALUE_TYPE& lvalue = value;
3109 dest.valuePtr(),
3110 MoveUtil::move(lvalue));
3111
3112 guard.release();
3113
3114 *toEnd = fromEnd + 1;
3115}
3116
3117template <class VALUE_TYPE, int BLOCK_LENGTH>
3118template <class ALLOCATOR>
3119void
3121 Iterator *toEnd,
3122 Iterator fromEnd,
3123 Iterator position,
3125 ALLOCATOR allocator,
3127{
3128 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
3129 BLOCK_LENGTH,
3130 ALLOCATOR> ElementGuard;
3131
3132 size_type backSize = fromEnd - position;
3133 Iterator end = fromEnd;
3134 Iterator dest = end + 1;
3135
3136 BSLS_ASSERT_SAFE(backSize >= 1);
3137
3138 ElementGuard guard(dest, dest, allocator);
3139
3140 // 1. move-construct back-most element being bumped 1 slot
3141
3142 --dest;
3143 --end;
3145 allocator,
3146 dest.valuePtr(),
3147 MoveUtil::move_if_noexcept(*end));
3148 guard.moveBegin(-1);
3149
3150 // 2. move-assign other existing elements being bumped back 1 slot
3151
3152 for (backSize -= 1; 0 < backSize; --backSize) {
3153 --dest;
3154 --end;
3155 *dest = MoveUtil::move_if_noexcept(*end);
3156 }
3157
3158 // 3. move-assign new element
3159
3160 VALUE_TYPE& lvalue = value;
3161 *position = MoveUtil::move(lvalue);
3162
3163 guard.release();
3164
3165 *toEnd = fromEnd + 1;
3166}
3167
3168template <class VALUE_TYPE, int BLOCK_LENGTH>
3169template <class ALLOCATOR>
3170inline
3171void
3172DequePrimitives<VALUE_TYPE, BLOCK_LENGTH>
3173 ::insertAndMoveToFront(Iterator *toBegin,
3174 Iterator fromBegin,
3175 Iterator position,
3176 size_type numElements,
3177 const VALUE_TYPE& value,
3178 ALLOCATOR allocator)
3179{
3180 enum {
3183
3184 VALUE = IS_BITWISECOPYABLE
3185 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
3186 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
3187 };
3188
3189 insertAndMoveToFront(toBegin,
3190 fromBegin,
3191 position,
3192 numElements,
3193 value,
3194 allocator,
3196}
3197
3198template <class VALUE_TYPE, int BLOCK_LENGTH>
3199template <class ALLOCATOR>
3200void
3202 Iterator *toBegin,
3203 Iterator fromBegin,
3204 Iterator position,
3205 size_type numElements,
3206 const VALUE_TYPE& value,
3207 ALLOCATOR allocator,
3209{
3210 size_type frontSize = position - fromBegin;
3211 Iterator begin = fromBegin;
3212 Iterator dest = begin - numElements;
3213
3214 // In case of aliasing, make a copy of the value.
3218 value);
3220 temp(BSLS_UTIL_ADDRESSOF(space.object()));
3221
3222 // TBD: this does the same thing as the old code - don't like that we
3223 // circumvent the whole allocator thing, but for now, let's keep it
3224 // consistent.
3225 // ConstructorProxy<VALUE_TYPE>
3226 // tempValue(value, bslma::Default::allocator());
3227
3228 // No guard needed since all the operations won't throw due to the
3229 // bitwise-copyable trait
3230 moveFront(&dest, &begin, frontSize);
3231 uninitializedFillNBack(&dest, dest, numElements, space.object(),
3232 allocator);
3233
3234 *toBegin = fromBegin - numElements;
3235}
3236
3237template <class VALUE_TYPE, int BLOCK_LENGTH>
3238template <class ALLOCATOR>
3239void
3241 Iterator *toBegin,
3242 Iterator fromBegin,
3243 Iterator position,
3244 size_type numElements,
3245 const VALUE_TYPE& value,
3246 ALLOCATOR allocator,
3248{
3249 typedef DequePrimitives_ExternalDequeElementGuard<VALUE_TYPE,
3250 BLOCK_LENGTH,
3251 ALLOCATOR> ExtGuard;
3252 size_type frontSize = position - fromBegin;
3253 Iterator begin = fromBegin;
3254 Iterator dest = begin - numElements;
3255
3256 // In case of aliasing, make a copy of the value.
3260 value);
3262 temp(BSLS_UTIL_ADDRESSOF(space.object()));
3263
3264 // TBD: this does the same thing as the old code - don't like that we
3265 // circumvent the whole allocator thing, but for now, let's keep it
3266 // consistent.
3267 // ConstructorProxy<VALUE_TYPE>
3268 // tempValue(value, bslma::Default::allocator());
3269
3270 // Create a reverse guard that will reverse the moveFront operation in case
3271 // of an exception.
3272 MoveGuard guard(begin, dest, frontSize, true);
3273
3274 moveFront(&dest, &begin, frontSize);
3275
3276 // Create a guard for 'uninitializedFillNBack' because it can throw under
3277 // 'bitwisemoveable' trait. Need to use this special guard because
3278 // uninitializedFillNBack is not exception safe.
3279 Iterator dest2(dest);
3280 ExtGuard eguard(&dest2, &dest, allocator);
3281
3282 uninitializedFillNBack(&dest, dest, numElements, space.object(),
3283 allocator);
3284
3285 eguard.release();
3286 guard.release();
3287 *toBegin = fromBegin - numElements;
3288}
3289
3290template <class VALUE_TYPE, int BLOCK_LENGTH>
3291template <class ALLOCATOR>
3292void
3294 Iterator *toBegin,
3295 Iterator fromBegin,
3296 Iterator position,
3297 size_type numElements,
3298 const VALUE_TYPE& value,
3299 ALLOCATOR allocator,
3301{
3302 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
3303 BLOCK_LENGTH,
3304 ALLOCATOR> ElementGuard;
3305
3306 size_type frontSize = position - fromBegin;
3307 Iterator begin = fromBegin;
3308 Iterator dest = begin - numElements;
3309 size_type numDest;
3310
3311 // In case of aliasing, make a copy of the value.
3315 value);
3317 temp(BSLS_UTIL_ADDRESSOF(space.object()));
3318
3319 // TBD: this does the same thing as the old code - don't like that we
3320 // circumvent the whole allocator thing, but for now, let's keep it
3321 // consistent.
3322 // ConstructorProxy<VALUE_TYPE>
3323 // tempValue(value, bslma::Default::allocator());
3324
3325 ElementGuard guard(dest, dest, allocator);
3326 if (frontSize >= numElements) {
3327 for (numDest = numElements; 0 < numDest; --numDest, ++dest, ++begin) {
3329 dest.valuePtr(),
3330 *begin);
3331 guard.moveEnd(1);
3332 }
3333 for (frontSize -= numElements; 0 < frontSize;
3334 --frontSize, ++dest, ++begin) {
3335 *dest = *begin;
3336 }
3337 for (numDest = numElements; 0 < numDest; --numDest, ++dest) {
3338 *dest = space.object();
3339 }
3340 } else {
3341 for (numDest = frontSize; 0 < numDest; --numDest, ++dest, ++begin) {
3343 dest.valuePtr(),
3344 *begin);
3345 guard.moveEnd(1);
3346 }
3347 for (numDest = numElements; frontSize < numDest; --numDest, ++dest) {
3349 dest.valuePtr(),
3350 space.object());
3351 guard.moveEnd(1);
3352 }
3353 for (; 0 < numDest; --numDest, ++dest) {
3354 *dest = space.object();
3355 }
3356 }
3357 guard.release();
3358 *toBegin = fromBegin - numElements;
3359}
3360
3361template <class VALUE_TYPE, int BLOCK_LENGTH>
3362template <class FWD_ITER, class ALLOCATOR>
3363void
3364DequePrimitives<VALUE_TYPE, BLOCK_LENGTH>
3365 ::insertAndMoveToFront(Iterator *toBegin,
3366 Iterator fromBegin,
3367 Iterator position,
3368 FWD_ITER first,
3369 FWD_ITER /*last*/,
3370 size_type numElements,
3371 ALLOCATOR allocator)
3372{
3373 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
3374 BLOCK_LENGTH,
3375 ALLOCATOR> ElementGuard;
3376
3377 size_type frontSize = position - fromBegin;
3378 Iterator begin = fromBegin;
3379 Iterator dest = begin - numElements;
3380 size_type numDest;
3381
3382 ElementGuard guard(dest, dest, allocator);
3383 if (frontSize >= numElements) {
3384 for (numDest = numElements; 0 < numDest; --numDest, ++dest, ++begin) {
3386 dest.valuePtr(),
3387 *begin);
3388 guard.moveEnd(1);
3389 }
3390 for (frontSize -= numElements; 0 < frontSize;
3391 --frontSize, ++dest, ++begin) {
3392 *dest = *begin;
3393 }
3394 for (numDest = numElements; 0 < numDest; --numDest, ++dest, ++first) {
3395 *dest = *first;
3396 }
3397 } else {
3398 for (numDest = frontSize; 0 < numDest; --numDest, ++dest, ++begin) {
3400 dest.valuePtr(),
3401 *begin);
3402 guard.moveEnd(1);
3403 }
3404 for (numDest = numElements; frontSize < numDest;
3405 --numDest, ++dest, ++first) {
3407 dest.valuePtr(),
3408 *first);
3409 guard.moveEnd(1);
3410 }
3411 for (; 0 < numDest; --numDest, ++dest, ++first) {
3412 *dest = *first;
3413 }
3414 }
3415 guard.release();
3416 *toBegin = fromBegin - numElements;
3417}
3418
3419template <class VALUE_TYPE, int BLOCK_LENGTH>
3420template <class ALLOCATOR>
3421inline
3422void
3424 Iterator *toBegin,
3425 Iterator fromBegin,
3426 Iterator position,
3428 ALLOCATOR allocator)
3429{
3430 enum {
3433
3434 VALUE = IS_BITWISECOPYABLE
3435 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
3436 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
3437 };
3438
3439 VALUE_TYPE& lvalue = value;
3440
3441 moveInsertAndMoveToFront(toBegin,
3442 fromBegin,
3443 position,
3444 MoveUtil::move(lvalue),
3445 allocator,
3447}
3448
3449template <class VALUE_TYPE, int BLOCK_LENGTH>
3450template <class ALLOCATOR>
3451void
3453 Iterator *toBegin,
3454 Iterator fromBegin,
3455 Iterator position,
3457 ALLOCATOR allocator,
3459{
3460 const size_type frontSize = position - fromBegin;
3461 Iterator begin = fromBegin;
3462 Iterator dest = begin - 1;
3463
3464 // No guard needed since no operations will throw with
3465 // 'BITWISE_COPYABLE_TRAITS'.
3466
3467 moveFront(&dest, &begin, frontSize);
3468
3469 VALUE_TYPE& lvalue = value;
3471 dest.valuePtr(),
3472 MoveUtil::move(lvalue));
3473
3474 *toBegin = fromBegin - 1;
3475}
3476
3477template <class VALUE_TYPE, int BLOCK_LENGTH>
3478template <class ALLOCATOR>
3479void
3481 Iterator *toBegin,
3482 Iterator fromBegin,
3483 Iterator position,
3485 ALLOCATOR allocator,
3487{
3488 const size_type frontSize = position - fromBegin;
3489 Iterator begin = fromBegin;
3490 Iterator dest = begin - 1;
3491
3492 // Create a reverse guard that will undo the 'moveFront' operation in case
3493 // of an exception.
3494
3495 MoveGuard guard(begin, dest, frontSize, true);
3496
3497 moveFront(&dest, &begin, frontSize);
3498
3499 VALUE_TYPE& lvalue = value;
3501 dest.valuePtr(),
3502 MoveUtil::move(lvalue));
3503
3504 guard.release();
3505
3506 *toBegin = fromBegin - 1;
3507}
3508
3509template <class VALUE_TYPE, int BLOCK_LENGTH>
3510template <class ALLOCATOR>
3511void
3513 Iterator *toBegin,
3514 Iterator fromBegin,
3515 Iterator position,
3517 ALLOCATOR allocator,
3519{
3520 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
3521 BLOCK_LENGTH,
3522 ALLOCATOR> ElementGuard;
3523
3524 size_type frontSize = position - fromBegin;
3525 Iterator begin = fromBegin;
3526 Iterator dest = begin - 1;
3527
3528 BSLS_ASSERT_SAFE(frontSize >= 1);
3529
3530 ElementGuard guard(dest, dest, allocator);
3531
3532 // 1. move-construct front-most element being bumped 1 slot
3533
3535 allocator,
3536 dest.valuePtr(),
3537 MoveUtil::move_if_noexcept(*begin));
3538 guard.moveEnd(1);
3539 ++dest;
3540 ++begin;
3541
3542 // 2. move-assign other existing elements being bumped forward 1 slot
3543
3544 for (frontSize -= 1; 0 < frontSize; --frontSize, ++dest, ++begin) {
3545 *dest = MoveUtil::move_if_noexcept(*begin);
3546 }
3547
3548 // 3. move-assign the new element
3549
3550 VALUE_TYPE& lvalue = value;
3551 *dest = MoveUtil::move(lvalue);
3552
3553 guard.release();
3554
3555 *toBegin = fromBegin - 1;
3556}
3557
3558#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
3559// {{{ BEGIN GENERATED CODE
3560// Command line: sim_cpp11_features.pl bslalg_dequeprimitives.h
3561#ifndef BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT
3562#define BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT 10
3563#endif
3564#ifndef BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B
3565#define BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT
3566#endif
3567#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 0
3568template <class VALUE_TYPE, int BLOCK_LENGTH>
3569template <class ALLOCATOR>
3570inline
3571void
3573 Iterator *toEnd,
3574 Iterator fromEnd,
3575 Iterator position,
3576 ALLOCATOR allocator)
3577{
3578 enum {
3581
3582 VALUE = IS_BITWISECOPYABLE
3583 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
3584 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
3585 };
3586
3587 emplaceAndMoveToBackDispatch(
3588 toEnd,
3589 fromEnd,
3590 position,
3591 allocator,
3593}
3594#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 0
3595
3596#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 1
3597template <class VALUE_TYPE, int BLOCK_LENGTH>
3598template <class ALLOCATOR, class Args_01>
3599inline
3600void
3602 Iterator *toEnd,
3603 Iterator fromEnd,
3604 Iterator position,
3605 ALLOCATOR allocator,
3606 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01)
3607{
3608 enum {
3611
3612 VALUE = IS_BITWISECOPYABLE
3613 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
3614 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
3615 };
3616
3617 emplaceAndMoveToBackDispatch(
3618 toEnd,
3619 fromEnd,
3620 position,
3621 allocator,
3623 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01));
3624}
3625#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 1
3626
3627#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 2
3628template <class VALUE_TYPE, int BLOCK_LENGTH>
3629template <class ALLOCATOR, class Args_01,
3630 class Args_02>
3631inline
3632void
3634 Iterator *toEnd,
3635 Iterator fromEnd,
3636 Iterator position,
3637 ALLOCATOR allocator,
3638 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
3639 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02)
3640{
3641 enum {
3644
3645 VALUE = IS_BITWISECOPYABLE
3646 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
3647 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
3648 };
3649
3650 emplaceAndMoveToBackDispatch(
3651 toEnd,
3652 fromEnd,
3653 position,
3654 allocator,
3656 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
3657 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02));
3658}
3659#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 2
3660
3661#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 3
3662template <class VALUE_TYPE, int BLOCK_LENGTH>
3663template <class ALLOCATOR, class Args_01,
3664 class Args_02,
3665 class Args_03>
3666inline
3667void
3669 Iterator *toEnd,
3670 Iterator fromEnd,
3671 Iterator position,
3672 ALLOCATOR allocator,
3673 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
3674 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
3675 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03)
3676{
3677 enum {
3680
3681 VALUE = IS_BITWISECOPYABLE
3682 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
3683 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
3684 };
3685
3686 emplaceAndMoveToBackDispatch(
3687 toEnd,
3688 fromEnd,
3689 position,
3690 allocator,
3692 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
3693 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
3694 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03));
3695}
3696#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 3
3697
3698#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 4
3699template <class VALUE_TYPE, int BLOCK_LENGTH>
3700template <class ALLOCATOR, class Args_01,
3701 class Args_02,
3702 class Args_03,
3703 class Args_04>
3704inline
3705void
3707 Iterator *toEnd,
3708 Iterator fromEnd,
3709 Iterator position,
3710 ALLOCATOR allocator,
3711 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
3712 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
3713 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
3714 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04)
3715{
3716 enum {
3719
3720 VALUE = IS_BITWISECOPYABLE
3721 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
3722 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
3723 };
3724
3725 emplaceAndMoveToBackDispatch(
3726 toEnd,
3727 fromEnd,
3728 position,
3729 allocator,
3731 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
3732 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
3733 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
3734 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04));
3735}
3736#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 4
3737
3738#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 5
3739template <class VALUE_TYPE, int BLOCK_LENGTH>
3740template <class ALLOCATOR, class Args_01,
3741 class Args_02,
3742 class Args_03,
3743 class Args_04,
3744 class Args_05>
3745inline
3746void
3748 Iterator *toEnd,
3749 Iterator fromEnd,
3750 Iterator position,
3751 ALLOCATOR allocator,
3752 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
3753 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
3754 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
3755 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
3756 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05)
3757{
3758 enum {
3761
3762 VALUE = IS_BITWISECOPYABLE
3763 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
3764 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
3765 };
3766
3767 emplaceAndMoveToBackDispatch(
3768 toEnd,
3769 fromEnd,
3770 position,
3771 allocator,
3773 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
3774 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
3775 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
3776 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
3777 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05));
3778}
3779#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 5
3780
3781#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 6
3782template <class VALUE_TYPE, int BLOCK_LENGTH>
3783template <class ALLOCATOR, class Args_01,
3784 class Args_02,
3785 class Args_03,
3786 class Args_04,
3787 class Args_05,
3788 class Args_06>
3789inline
3790void
3792 Iterator *toEnd,
3793 Iterator fromEnd,
3794 Iterator position,
3795 ALLOCATOR allocator,
3796 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
3797 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
3798 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
3799 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
3800 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
3801 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06)
3802{
3803 enum {
3806
3807 VALUE = IS_BITWISECOPYABLE
3808 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
3809 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
3810 };
3811
3812 emplaceAndMoveToBackDispatch(
3813 toEnd,
3814 fromEnd,
3815 position,
3816 allocator,
3818 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
3819 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
3820 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
3821 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
3822 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
3823 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06));
3824}
3825#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 6
3826
3827#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 7
3828template <class VALUE_TYPE, int BLOCK_LENGTH>
3829template <class ALLOCATOR, class Args_01,
3830 class Args_02,
3831 class Args_03,
3832 class Args_04,
3833 class Args_05,
3834 class Args_06,
3835 class Args_07>
3836inline
3837void
3839 Iterator *toEnd,
3840 Iterator fromEnd,
3841 Iterator position,
3842 ALLOCATOR allocator,
3843 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
3844 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
3845 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
3846 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
3847 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
3848 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
3849 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07)
3850{
3851 enum {
3854
3855 VALUE = IS_BITWISECOPYABLE
3856 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
3857 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
3858 };
3859
3860 emplaceAndMoveToBackDispatch(
3861 toEnd,
3862 fromEnd,
3863 position,
3864 allocator,
3866 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
3867 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
3868 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
3869 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
3870 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
3871 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
3872 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07));
3873}
3874#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 7
3875
3876#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 8
3877template <class VALUE_TYPE, int BLOCK_LENGTH>
3878template <class ALLOCATOR, class Args_01,
3879 class Args_02,
3880 class Args_03,
3881 class Args_04,
3882 class Args_05,
3883 class Args_06,
3884 class Args_07,
3885 class Args_08>
3886inline
3887void
3889 Iterator *toEnd,
3890 Iterator fromEnd,
3891 Iterator position,
3892 ALLOCATOR allocator,
3893 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
3894 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
3895 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
3896 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
3897 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
3898 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
3899 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
3900 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08)
3901{
3902 enum {
3905
3906 VALUE = IS_BITWISECOPYABLE
3907 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
3908 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
3909 };
3910
3911 emplaceAndMoveToBackDispatch(
3912 toEnd,
3913 fromEnd,
3914 position,
3915 allocator,
3917 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
3918 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
3919 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
3920 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
3921 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
3922 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
3923 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
3924 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08));
3925}
3926#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 8
3927
3928#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 9
3929template <class VALUE_TYPE, int BLOCK_LENGTH>
3930template <class ALLOCATOR, class Args_01,
3931 class Args_02,
3932 class Args_03,
3933 class Args_04,
3934 class Args_05,
3935 class Args_06,
3936 class Args_07,
3937 class Args_08,
3938 class Args_09>
3939inline
3940void
3942 Iterator *toEnd,
3943 Iterator fromEnd,
3944 Iterator position,
3945 ALLOCATOR allocator,
3946 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
3947 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
3948 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
3949 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
3950 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
3951 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
3952 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
3953 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
3954 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09)
3955{
3956 enum {
3959
3960 VALUE = IS_BITWISECOPYABLE
3961 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
3962 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
3963 };
3964
3965 emplaceAndMoveToBackDispatch(
3966 toEnd,
3967 fromEnd,
3968 position,
3969 allocator,
3971 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
3972 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
3973 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
3974 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
3975 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
3976 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
3977 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
3978 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
3979 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09));
3980}
3981#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 9
3982
3983#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 10
3984template <class VALUE_TYPE, int BLOCK_LENGTH>
3985template <class ALLOCATOR, class Args_01,
3986 class Args_02,
3987 class Args_03,
3988 class Args_04,
3989 class Args_05,
3990 class Args_06,
3991 class Args_07,
3992 class Args_08,
3993 class Args_09,
3994 class Args_10>
3995inline
3996void
3998 Iterator *toEnd,
3999 Iterator fromEnd,
4000 Iterator position,
4001 ALLOCATOR allocator,
4002 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4003 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
4004 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
4005 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
4006 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
4007 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
4008 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
4009 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
4010 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09,
4011 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) arguments_10)
4012{
4013 enum {
4016
4017 VALUE = IS_BITWISECOPYABLE
4018 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
4019 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
4020 };
4021
4022 emplaceAndMoveToBackDispatch(
4023 toEnd,
4024 fromEnd,
4025 position,
4026 allocator,
4028 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4029 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
4030 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
4031 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
4032 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
4033 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
4034 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
4035 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
4036 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09),
4037 BSLS_COMPILERFEATURES_FORWARD(Args_10, arguments_10));
4038}
4039#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 10
4040
4041
4042#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 0
4043template <class VALUE_TYPE, int BLOCK_LENGTH>
4044template <class ALLOCATOR>
4045void
4047 Iterator *toEnd,
4048 Iterator fromEnd,
4049 Iterator position,
4050 ALLOCATOR allocator,
4052{
4053 const size_type backSize = fromEnd - position;
4054 Iterator end = fromEnd;
4055 Iterator dest = end + 1;
4056
4057
4058 moveBack(&dest, &end, backSize);
4059 --dest;
4060
4062 allocator,
4063 dest.valuePtr());
4064
4065 *toEnd = fromEnd + 1;
4066}
4067#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 0
4068
4069#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 1
4070template <class VALUE_TYPE, int BLOCK_LENGTH>
4071template <class ALLOCATOR, class Args_01>
4072void
4074 Iterator *toEnd,
4075 Iterator fromEnd,
4076 Iterator position,
4077 ALLOCATOR allocator,
4079 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01)
4080{
4081 const size_type backSize = fromEnd - position;
4082 Iterator end = fromEnd;
4083 Iterator dest = end + 1;
4084
4085
4086 moveBack(&dest, &end, backSize);
4087 --dest;
4088
4090 allocator,
4091 dest.valuePtr(),
4092 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01));
4093
4094 *toEnd = fromEnd + 1;
4095}
4096#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 1
4097
4098#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 2
4099template <class VALUE_TYPE, int BLOCK_LENGTH>
4100template <class ALLOCATOR, class Args_01,
4101 class Args_02>
4102void
4104 Iterator *toEnd,
4105 Iterator fromEnd,
4106 Iterator position,
4107 ALLOCATOR allocator,
4109 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4110 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02)
4111{
4112 const size_type backSize = fromEnd - position;
4113 Iterator end = fromEnd;
4114 Iterator dest = end + 1;
4115
4116
4117 moveBack(&dest, &end, backSize);
4118 --dest;
4119
4121 allocator,
4122 dest.valuePtr(),
4123 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4124 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02));
4125
4126 *toEnd = fromEnd + 1;
4127}
4128#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 2
4129
4130#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 3
4131template <class VALUE_TYPE, int BLOCK_LENGTH>
4132template <class ALLOCATOR, class Args_01,
4133 class Args_02,
4134 class Args_03>
4135void
4137 Iterator *toEnd,
4138 Iterator fromEnd,
4139 Iterator position,
4140 ALLOCATOR allocator,
4142 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4143 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
4144 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03)
4145{
4146 const size_type backSize = fromEnd - position;
4147 Iterator end = fromEnd;
4148 Iterator dest = end + 1;
4149
4150
4151 moveBack(&dest, &end, backSize);
4152 --dest;
4153
4155 allocator,
4156 dest.valuePtr(),
4157 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4158 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
4159 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03));
4160
4161 *toEnd = fromEnd + 1;
4162}
4163#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 3
4164
4165#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 4
4166template <class VALUE_TYPE, int BLOCK_LENGTH>
4167template <class ALLOCATOR, class Args_01,
4168 class Args_02,
4169 class Args_03,
4170 class Args_04>
4171void
4173 Iterator *toEnd,
4174 Iterator fromEnd,
4175 Iterator position,
4176 ALLOCATOR allocator,
4178 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4179 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
4180 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
4181 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04)
4182{
4183 const size_type backSize = fromEnd - position;
4184 Iterator end = fromEnd;
4185 Iterator dest = end + 1;
4186
4187
4188 moveBack(&dest, &end, backSize);
4189 --dest;
4190
4192 allocator,
4193 dest.valuePtr(),
4194 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4195 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
4196 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
4197 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04));
4198
4199 *toEnd = fromEnd + 1;
4200}
4201#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 4
4202
4203#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 5
4204template <class VALUE_TYPE, int BLOCK_LENGTH>
4205template <class ALLOCATOR, class Args_01,
4206 class Args_02,
4207 class Args_03,
4208 class Args_04,
4209 class Args_05>
4210void
4212 Iterator *toEnd,
4213 Iterator fromEnd,
4214 Iterator position,
4215 ALLOCATOR allocator,
4217 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4218 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
4219 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
4220 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
4221 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05)
4222{
4223 const size_type backSize = fromEnd - position;
4224 Iterator end = fromEnd;
4225 Iterator dest = end + 1;
4226
4227
4228 moveBack(&dest, &end, backSize);
4229 --dest;
4230
4232 allocator,
4233 dest.valuePtr(),
4234 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4235 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
4236 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
4237 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
4238 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05));
4239
4240 *toEnd = fromEnd + 1;
4241}
4242#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 5
4243
4244#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 6
4245template <class VALUE_TYPE, int BLOCK_LENGTH>
4246template <class ALLOCATOR, class Args_01,
4247 class Args_02,
4248 class Args_03,
4249 class Args_04,
4250 class Args_05,
4251 class Args_06>
4252void
4254 Iterator *toEnd,
4255 Iterator fromEnd,
4256 Iterator position,
4257 ALLOCATOR allocator,
4259 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4260 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
4261 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
4262 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
4263 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
4264 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06)
4265{
4266 const size_type backSize = fromEnd - position;
4267 Iterator end = fromEnd;
4268 Iterator dest = end + 1;
4269
4270
4271 moveBack(&dest, &end, backSize);
4272 --dest;
4273
4275 allocator,
4276 dest.valuePtr(),
4277 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4278 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
4279 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
4280 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
4281 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
4282 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06));
4283
4284 *toEnd = fromEnd + 1;
4285}
4286#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 6
4287
4288#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 7
4289template <class VALUE_TYPE, int BLOCK_LENGTH>
4290template <class ALLOCATOR, class Args_01,
4291 class Args_02,
4292 class Args_03,
4293 class Args_04,
4294 class Args_05,
4295 class Args_06,
4296 class Args_07>
4297void
4299 Iterator *toEnd,
4300 Iterator fromEnd,
4301 Iterator position,
4302 ALLOCATOR allocator,
4304 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4305 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
4306 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
4307 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
4308 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
4309 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
4310 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07)
4311{
4312 const size_type backSize = fromEnd - position;
4313 Iterator end = fromEnd;
4314 Iterator dest = end + 1;
4315
4316
4317 moveBack(&dest, &end, backSize);
4318 --dest;
4319
4321 allocator,
4322 dest.valuePtr(),
4323 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4324 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
4325 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
4326 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
4327 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
4328 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
4329 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07));
4330
4331 *toEnd = fromEnd + 1;
4332}
4333#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 7
4334
4335#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 8
4336template <class VALUE_TYPE, int BLOCK_LENGTH>
4337template <class ALLOCATOR, class Args_01,
4338 class Args_02,
4339 class Args_03,
4340 class Args_04,
4341 class Args_05,
4342 class Args_06,
4343 class Args_07,
4344 class Args_08>
4345void
4347 Iterator *toEnd,
4348 Iterator fromEnd,
4349 Iterator position,
4350 ALLOCATOR allocator,
4352 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4353 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
4354 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
4355 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
4356 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
4357 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
4358 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
4359 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08)
4360{
4361 const size_type backSize = fromEnd - position;
4362 Iterator end = fromEnd;
4363 Iterator dest = end + 1;
4364
4365
4366 moveBack(&dest, &end, backSize);
4367 --dest;
4368
4370 allocator,
4371 dest.valuePtr(),
4372 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4373 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
4374 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
4375 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
4376 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
4377 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
4378 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
4379 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08));
4380
4381 *toEnd = fromEnd + 1;
4382}
4383#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 8
4384
4385#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 9
4386template <class VALUE_TYPE, int BLOCK_LENGTH>
4387template <class ALLOCATOR, class Args_01,
4388 class Args_02,
4389 class Args_03,
4390 class Args_04,
4391 class Args_05,
4392 class Args_06,
4393 class Args_07,
4394 class Args_08,
4395 class Args_09>
4396void
4398 Iterator *toEnd,
4399 Iterator fromEnd,
4400 Iterator position,
4401 ALLOCATOR allocator,
4403 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4404 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
4405 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
4406 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
4407 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
4408 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
4409 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
4410 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
4411 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09)
4412{
4413 const size_type backSize = fromEnd - position;
4414 Iterator end = fromEnd;
4415 Iterator dest = end + 1;
4416
4417
4418 moveBack(&dest, &end, backSize);
4419 --dest;
4420
4422 allocator,
4423 dest.valuePtr(),
4424 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4425 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
4426 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
4427 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
4428 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
4429 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
4430 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
4431 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
4432 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09));
4433
4434 *toEnd = fromEnd + 1;
4435}
4436#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 9
4437
4438#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 10
4439template <class VALUE_TYPE, int BLOCK_LENGTH>
4440template <class ALLOCATOR, class Args_01,
4441 class Args_02,
4442 class Args_03,
4443 class Args_04,
4444 class Args_05,
4445 class Args_06,
4446 class Args_07,
4447 class Args_08,
4448 class Args_09,
4449 class Args_10>
4450void
4452 Iterator *toEnd,
4453 Iterator fromEnd,
4454 Iterator position,
4455 ALLOCATOR allocator,
4457 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4458 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
4459 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
4460 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
4461 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
4462 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
4463 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
4464 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
4465 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09,
4466 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) arguments_10)
4467{
4468 const size_type backSize = fromEnd - position;
4469 Iterator end = fromEnd;
4470 Iterator dest = end + 1;
4471
4472
4473 moveBack(&dest, &end, backSize);
4474 --dest;
4475
4477 allocator,
4478 dest.valuePtr(),
4479 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4480 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
4481 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
4482 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
4483 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
4484 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
4485 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
4486 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
4487 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09),
4488 BSLS_COMPILERFEATURES_FORWARD(Args_10, arguments_10));
4489
4490 *toEnd = fromEnd + 1;
4491}
4492#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 10
4493
4494
4495#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 0
4496template <class VALUE_TYPE, int BLOCK_LENGTH>
4497template <class ALLOCATOR>
4498void
4500 Iterator *toEnd,
4501 Iterator fromEnd,
4502 Iterator position,
4503 ALLOCATOR allocator,
4505{
4506 const size_type backSize = fromEnd - position;
4507 Iterator end = fromEnd;
4508 Iterator dest = end + 1;
4509
4510
4511 MoveGuard guard(end, dest, backSize, false);
4512
4513 moveBack(&dest, &end, backSize);
4514 --dest;
4515
4517 allocator,
4518 dest.valuePtr());
4519
4520 guard.release();
4521
4522 *toEnd = fromEnd + 1;
4523}
4524#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 0
4525
4526#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 1
4527template <class VALUE_TYPE, int BLOCK_LENGTH>
4528template <class ALLOCATOR, class Args_01>
4529void
4531 Iterator *toEnd,
4532 Iterator fromEnd,
4533 Iterator position,
4534 ALLOCATOR allocator,
4536 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01)
4537{
4538 const size_type backSize = fromEnd - position;
4539 Iterator end = fromEnd;
4540 Iterator dest = end + 1;
4541
4542
4543 MoveGuard guard(end, dest, backSize, false);
4544
4545 moveBack(&dest, &end, backSize);
4546 --dest;
4547
4549 allocator,
4550 dest.valuePtr(),
4551 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01));
4552
4553 guard.release();
4554
4555 *toEnd = fromEnd + 1;
4556}
4557#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 1
4558
4559#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 2
4560template <class VALUE_TYPE, int BLOCK_LENGTH>
4561template <class ALLOCATOR, class Args_01,
4562 class Args_02>
4563void
4565 Iterator *toEnd,
4566 Iterator fromEnd,
4567 Iterator position,
4568 ALLOCATOR allocator,
4570 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4571 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02)
4572{
4573 const size_type backSize = fromEnd - position;
4574 Iterator end = fromEnd;
4575 Iterator dest = end + 1;
4576
4577
4578 MoveGuard guard(end, dest, backSize, false);
4579
4580 moveBack(&dest, &end, backSize);
4581 --dest;
4582
4584 allocator,
4585 dest.valuePtr(),
4586 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4587 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02));
4588
4589 guard.release();
4590
4591 *toEnd = fromEnd + 1;
4592}
4593#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 2
4594
4595#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 3
4596template <class VALUE_TYPE, int BLOCK_LENGTH>
4597template <class ALLOCATOR, class Args_01,
4598 class Args_02,
4599 class Args_03>
4600void
4602 Iterator *toEnd,
4603 Iterator fromEnd,
4604 Iterator position,
4605 ALLOCATOR allocator,
4607 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4608 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
4609 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03)
4610{
4611 const size_type backSize = fromEnd - position;
4612 Iterator end = fromEnd;
4613 Iterator dest = end + 1;
4614
4615
4616 MoveGuard guard(end, dest, backSize, false);
4617
4618 moveBack(&dest, &end, backSize);
4619 --dest;
4620
4622 allocator,
4623 dest.valuePtr(),
4624 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4625 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
4626 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03));
4627
4628 guard.release();
4629
4630 *toEnd = fromEnd + 1;
4631}
4632#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 3
4633
4634#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 4
4635template <class VALUE_TYPE, int BLOCK_LENGTH>
4636template <class ALLOCATOR, class Args_01,
4637 class Args_02,
4638 class Args_03,
4639 class Args_04>
4640void
4642 Iterator *toEnd,
4643 Iterator fromEnd,
4644 Iterator position,
4645 ALLOCATOR allocator,
4647 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4648 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
4649 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
4650 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04)
4651{
4652 const size_type backSize = fromEnd - position;
4653 Iterator end = fromEnd;
4654 Iterator dest = end + 1;
4655
4656
4657 MoveGuard guard(end, dest, backSize, false);
4658
4659 moveBack(&dest, &end, backSize);
4660 --dest;
4661
4663 allocator,
4664 dest.valuePtr(),
4665 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4666 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
4667 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
4668 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04));
4669
4670 guard.release();
4671
4672 *toEnd = fromEnd + 1;
4673}
4674#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 4
4675
4676#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 5
4677template <class VALUE_TYPE, int BLOCK_LENGTH>
4678template <class ALLOCATOR, class Args_01,
4679 class Args_02,
4680 class Args_03,
4681 class Args_04,
4682 class Args_05>
4683void
4685 Iterator *toEnd,
4686 Iterator fromEnd,
4687 Iterator position,
4688 ALLOCATOR allocator,
4690 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4691 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
4692 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
4693 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
4694 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05)
4695{
4696 const size_type backSize = fromEnd - position;
4697 Iterator end = fromEnd;
4698 Iterator dest = end + 1;
4699
4700
4701 MoveGuard guard(end, dest, backSize, false);
4702
4703 moveBack(&dest, &end, backSize);
4704 --dest;
4705
4707 allocator,
4708 dest.valuePtr(),
4709 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4710 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
4711 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
4712 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
4713 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05));
4714
4715 guard.release();
4716
4717 *toEnd = fromEnd + 1;
4718}
4719#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 5
4720
4721#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 6
4722template <class VALUE_TYPE, int BLOCK_LENGTH>
4723template <class ALLOCATOR, class Args_01,
4724 class Args_02,
4725 class Args_03,
4726 class Args_04,
4727 class Args_05,
4728 class Args_06>
4729void
4731 Iterator *toEnd,
4732 Iterator fromEnd,
4733 Iterator position,
4734 ALLOCATOR allocator,
4736 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4737 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
4738 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
4739 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
4740 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
4741 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06)
4742{
4743 const size_type backSize = fromEnd - position;
4744 Iterator end = fromEnd;
4745 Iterator dest = end + 1;
4746
4747
4748 MoveGuard guard(end, dest, backSize, false);
4749
4750 moveBack(&dest, &end, backSize);
4751 --dest;
4752
4754 allocator,
4755 dest.valuePtr(),
4756 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4757 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
4758 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
4759 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
4760 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
4761 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06));
4762
4763 guard.release();
4764
4765 *toEnd = fromEnd + 1;
4766}
4767#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 6
4768
4769#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 7
4770template <class VALUE_TYPE, int BLOCK_LENGTH>
4771template <class ALLOCATOR, class Args_01,
4772 class Args_02,
4773 class Args_03,
4774 class Args_04,
4775 class Args_05,
4776 class Args_06,
4777 class Args_07>
4778void
4780 Iterator *toEnd,
4781 Iterator fromEnd,
4782 Iterator position,
4783 ALLOCATOR allocator,
4785 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4786 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
4787 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
4788 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
4789 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
4790 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
4791 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07)
4792{
4793 const size_type backSize = fromEnd - position;
4794 Iterator end = fromEnd;
4795 Iterator dest = end + 1;
4796
4797
4798 MoveGuard guard(end, dest, backSize, false);
4799
4800 moveBack(&dest, &end, backSize);
4801 --dest;
4802
4804 allocator,
4805 dest.valuePtr(),
4806 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4807 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
4808 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
4809 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
4810 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
4811 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
4812 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07));
4813
4814 guard.release();
4815
4816 *toEnd = fromEnd + 1;
4817}
4818#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 7
4819
4820#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 8
4821template <class VALUE_TYPE, int BLOCK_LENGTH>
4822template <class ALLOCATOR, class Args_01,
4823 class Args_02,
4824 class Args_03,
4825 class Args_04,
4826 class Args_05,
4827 class Args_06,
4828 class Args_07,
4829 class Args_08>
4830void
4832 Iterator *toEnd,
4833 Iterator fromEnd,
4834 Iterator position,
4835 ALLOCATOR allocator,
4837 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4838 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
4839 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
4840 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
4841 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
4842 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
4843 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
4844 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08)
4845{
4846 const size_type backSize = fromEnd - position;
4847 Iterator end = fromEnd;
4848 Iterator dest = end + 1;
4849
4850
4851 MoveGuard guard(end, dest, backSize, false);
4852
4853 moveBack(&dest, &end, backSize);
4854 --dest;
4855
4857 allocator,
4858 dest.valuePtr(),
4859 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4860 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
4861 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
4862 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
4863 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
4864 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
4865 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
4866 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08));
4867
4868 guard.release();
4869
4870 *toEnd = fromEnd + 1;
4871}
4872#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 8
4873
4874#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 9
4875template <class VALUE_TYPE, int BLOCK_LENGTH>
4876template <class ALLOCATOR, class Args_01,
4877 class Args_02,
4878 class Args_03,
4879 class Args_04,
4880 class Args_05,
4881 class Args_06,
4882 class Args_07,
4883 class Args_08,
4884 class Args_09>
4885void
4887 Iterator *toEnd,
4888 Iterator fromEnd,
4889 Iterator position,
4890 ALLOCATOR allocator,
4892 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4893 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
4894 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
4895 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
4896 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
4897 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
4898 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
4899 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
4900 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09)
4901{
4902 const size_type backSize = fromEnd - position;
4903 Iterator end = fromEnd;
4904 Iterator dest = end + 1;
4905
4906
4907 MoveGuard guard(end, dest, backSize, false);
4908
4909 moveBack(&dest, &end, backSize);
4910 --dest;
4911
4913 allocator,
4914 dest.valuePtr(),
4915 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4916 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
4917 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
4918 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
4919 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
4920 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
4921 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
4922 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
4923 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09));
4924
4925 guard.release();
4926
4927 *toEnd = fromEnd + 1;
4928}
4929#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 9
4930
4931#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 10
4932template <class VALUE_TYPE, int BLOCK_LENGTH>
4933template <class ALLOCATOR, class Args_01,
4934 class Args_02,
4935 class Args_03,
4936 class Args_04,
4937 class Args_05,
4938 class Args_06,
4939 class Args_07,
4940 class Args_08,
4941 class Args_09,
4942 class Args_10>
4943void
4945 Iterator *toEnd,
4946 Iterator fromEnd,
4947 Iterator position,
4948 ALLOCATOR allocator,
4950 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
4951 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
4952 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
4953 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
4954 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
4955 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
4956 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
4957 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
4958 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09,
4959 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) arguments_10)
4960{
4961 const size_type backSize = fromEnd - position;
4962 Iterator end = fromEnd;
4963 Iterator dest = end + 1;
4964
4965
4966 MoveGuard guard(end, dest, backSize, false);
4967
4968 moveBack(&dest, &end, backSize);
4969 --dest;
4970
4972 allocator,
4973 dest.valuePtr(),
4974 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
4975 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
4976 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
4977 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
4978 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
4979 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
4980 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
4981 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
4982 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09),
4983 BSLS_COMPILERFEATURES_FORWARD(Args_10, arguments_10));
4984
4985 guard.release();
4986
4987 *toEnd = fromEnd + 1;
4988}
4989#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 10
4990
4991
4992#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 0
4993template <class VALUE_TYPE, int BLOCK_LENGTH>
4994template <class ALLOCATOR>
4995void
4997 Iterator *toEnd,
4998 Iterator fromEnd,
4999 Iterator position,
5000 ALLOCATOR allocator,
5002{
5003 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
5004 BLOCK_LENGTH,
5005 ALLOCATOR> ElementGuard;
5006
5007 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
5008 BLOCK_LENGTH> EndpointProctor;
5009
5010 size_type backSize = fromEnd - position;
5011 Iterator end = fromEnd;
5012 Iterator dest = end + 1;
5013
5014 BSLS_ASSERT_SAFE(backSize >= 1);
5015
5016 ElementGuard guard(dest, dest, allocator);
5017
5018
5019 --dest;
5020 --end;
5022 allocator,
5023 dest.valuePtr(),
5024 MoveUtil::move_if_noexcept(*end));
5025 guard.moveBegin(-1);
5026
5027
5028 size_type n = 0;
5029 for (backSize -= 1; 0 < backSize; --backSize) {
5030 --dest;
5031 --end;
5032 *dest = MoveUtil::move_if_noexcept(*end);
5033 ++n;
5034 }
5035 guard.moveBegin(-n);
5036
5037
5038 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, position.valuePtr());
5039
5040
5041
5042 EndpointProctor endpointProctor(toEnd, position);
5043
5045 allocator,
5046 position.valuePtr());
5047
5048 endpointProctor.release();
5049 guard.release();
5050
5051 *toEnd = fromEnd + 1;
5052}
5053#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 0
5054
5055#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 1
5056template <class VALUE_TYPE, int BLOCK_LENGTH>
5057template <class ALLOCATOR, class Args_01>
5058void
5060 Iterator *toEnd,
5061 Iterator fromEnd,
5062 Iterator position,
5063 ALLOCATOR allocator,
5065 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01)
5066{
5067 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
5068 BLOCK_LENGTH,
5069 ALLOCATOR> ElementGuard;
5070
5071 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
5072 BLOCK_LENGTH> EndpointProctor;
5073
5074 size_type backSize = fromEnd - position;
5075 Iterator end = fromEnd;
5076 Iterator dest = end + 1;
5077
5078 BSLS_ASSERT_SAFE(backSize >= 1);
5079
5080 ElementGuard guard(dest, dest, allocator);
5081
5082
5083 --dest;
5084 --end;
5086 allocator,
5087 dest.valuePtr(),
5088 MoveUtil::move_if_noexcept(*end));
5089 guard.moveBegin(-1);
5090
5091
5092 size_type n = 0;
5093 for (backSize -= 1; 0 < backSize; --backSize) {
5094 --dest;
5095 --end;
5096 *dest = MoveUtil::move_if_noexcept(*end);
5097 ++n;
5098 }
5099 guard.moveBegin(-n);
5100
5101
5102 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, position.valuePtr());
5103
5104
5105
5106 EndpointProctor endpointProctor(toEnd, position);
5107
5109 allocator,
5110 position.valuePtr(),
5111 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01));
5112
5113 endpointProctor.release();
5114 guard.release();
5115
5116 *toEnd = fromEnd + 1;
5117}
5118#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 1
5119
5120#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 2
5121template <class VALUE_TYPE, int BLOCK_LENGTH>
5122template <class ALLOCATOR, class Args_01,
5123 class Args_02>
5124void
5126 Iterator *toEnd,
5127 Iterator fromEnd,
5128 Iterator position,
5129 ALLOCATOR allocator,
5131 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
5132 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02)
5133{
5134 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
5135 BLOCK_LENGTH,
5136 ALLOCATOR> ElementGuard;
5137
5138 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
5139 BLOCK_LENGTH> EndpointProctor;
5140
5141 size_type backSize = fromEnd - position;
5142 Iterator end = fromEnd;
5143 Iterator dest = end + 1;
5144
5145 BSLS_ASSERT_SAFE(backSize >= 1);
5146
5147 ElementGuard guard(dest, dest, allocator);
5148
5149
5150 --dest;
5151 --end;
5153 allocator,
5154 dest.valuePtr(),
5155 MoveUtil::move_if_noexcept(*end));
5156 guard.moveBegin(-1);
5157
5158
5159 size_type n = 0;
5160 for (backSize -= 1; 0 < backSize; --backSize) {
5161 --dest;
5162 --end;
5163 *dest = MoveUtil::move_if_noexcept(*end);
5164 ++n;
5165 }
5166 guard.moveBegin(-n);
5167
5168
5169 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, position.valuePtr());
5170
5171
5172
5173 EndpointProctor endpointProctor(toEnd, position);
5174
5176 allocator,
5177 position.valuePtr(),
5178 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
5179 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02));
5180
5181 endpointProctor.release();
5182 guard.release();
5183
5184 *toEnd = fromEnd + 1;
5185}
5186#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 2
5187
5188#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 3
5189template <class VALUE_TYPE, int BLOCK_LENGTH>
5190template <class ALLOCATOR, class Args_01,
5191 class Args_02,
5192 class Args_03>
5193void
5195 Iterator *toEnd,
5196 Iterator fromEnd,
5197 Iterator position,
5198 ALLOCATOR allocator,
5200 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
5201 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
5202 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03)
5203{
5204 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
5205 BLOCK_LENGTH,
5206 ALLOCATOR> ElementGuard;
5207
5208 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
5209 BLOCK_LENGTH> EndpointProctor;
5210
5211 size_type backSize = fromEnd - position;
5212 Iterator end = fromEnd;
5213 Iterator dest = end + 1;
5214
5215 BSLS_ASSERT_SAFE(backSize >= 1);
5216
5217 ElementGuard guard(dest, dest, allocator);
5218
5219
5220 --dest;
5221 --end;
5223 allocator,
5224 dest.valuePtr(),
5225 MoveUtil::move_if_noexcept(*end));
5226 guard.moveBegin(-1);
5227
5228
5229 size_type n = 0;
5230 for (backSize -= 1; 0 < backSize; --backSize) {
5231 --dest;
5232 --end;
5233 *dest = MoveUtil::move_if_noexcept(*end);
5234 ++n;
5235 }
5236 guard.moveBegin(-n);
5237
5238
5239 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, position.valuePtr());
5240
5241
5242
5243 EndpointProctor endpointProctor(toEnd, position);
5244
5246 allocator,
5247 position.valuePtr(),
5248 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
5249 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
5250 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03));
5251
5252 endpointProctor.release();
5253 guard.release();
5254
5255 *toEnd = fromEnd + 1;
5256}
5257#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 3
5258
5259#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 4
5260template <class VALUE_TYPE, int BLOCK_LENGTH>
5261template <class ALLOCATOR, class Args_01,
5262 class Args_02,
5263 class Args_03,
5264 class Args_04>
5265void
5267 Iterator *toEnd,
5268 Iterator fromEnd,
5269 Iterator position,
5270 ALLOCATOR allocator,
5272 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
5273 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
5274 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
5275 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04)
5276{
5277 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
5278 BLOCK_LENGTH,
5279 ALLOCATOR> ElementGuard;
5280
5281 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
5282 BLOCK_LENGTH> EndpointProctor;
5283
5284 size_type backSize = fromEnd - position;
5285 Iterator end = fromEnd;
5286 Iterator dest = end + 1;
5287
5288 BSLS_ASSERT_SAFE(backSize >= 1);
5289
5290 ElementGuard guard(dest, dest, allocator);
5291
5292
5293 --dest;
5294 --end;
5296 allocator,
5297 dest.valuePtr(),
5298 MoveUtil::move_if_noexcept(*end));
5299 guard.moveBegin(-1);
5300
5301
5302 size_type n = 0;
5303 for (backSize -= 1; 0 < backSize; --backSize) {
5304 --dest;
5305 --end;
5306 *dest = MoveUtil::move_if_noexcept(*end);
5307 ++n;
5308 }
5309 guard.moveBegin(-n);
5310
5311
5312 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, position.valuePtr());
5313
5314
5315
5316 EndpointProctor endpointProctor(toEnd, position);
5317
5319 allocator,
5320 position.valuePtr(),
5321 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
5322 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
5323 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
5324 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04));
5325
5326 endpointProctor.release();
5327 guard.release();
5328
5329 *toEnd = fromEnd + 1;
5330}
5331#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 4
5332
5333#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 5
5334template <class VALUE_TYPE, int BLOCK_LENGTH>
5335template <class ALLOCATOR, class Args_01,
5336 class Args_02,
5337 class Args_03,
5338 class Args_04,
5339 class Args_05>
5340void
5342 Iterator *toEnd,
5343 Iterator fromEnd,
5344 Iterator position,
5345 ALLOCATOR allocator,
5347 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
5348 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
5349 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
5350 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
5351 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05)
5352{
5353 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
5354 BLOCK_LENGTH,
5355 ALLOCATOR> ElementGuard;
5356
5357 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
5358 BLOCK_LENGTH> EndpointProctor;
5359
5360 size_type backSize = fromEnd - position;
5361 Iterator end = fromEnd;
5362 Iterator dest = end + 1;
5363
5364 BSLS_ASSERT_SAFE(backSize >= 1);
5365
5366 ElementGuard guard(dest, dest, allocator);
5367
5368
5369 --dest;
5370 --end;
5372 allocator,
5373 dest.valuePtr(),
5374 MoveUtil::move_if_noexcept(*end));
5375 guard.moveBegin(-1);
5376
5377
5378 size_type n = 0;
5379 for (backSize -= 1; 0 < backSize; --backSize) {
5380 --dest;
5381 --end;
5382 *dest = MoveUtil::move_if_noexcept(*end);
5383 ++n;
5384 }
5385 guard.moveBegin(-n);
5386
5387
5388 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, position.valuePtr());
5389
5390
5391
5392 EndpointProctor endpointProctor(toEnd, position);
5393
5395 allocator,
5396 position.valuePtr(),
5397 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
5398 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
5399 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
5400 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
5401 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05));
5402
5403 endpointProctor.release();
5404 guard.release();
5405
5406 *toEnd = fromEnd + 1;
5407}
5408#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 5
5409
5410#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 6
5411template <class VALUE_TYPE, int BLOCK_LENGTH>
5412template <class ALLOCATOR, class Args_01,
5413 class Args_02,
5414 class Args_03,
5415 class Args_04,
5416 class Args_05,
5417 class Args_06>
5418void
5420 Iterator *toEnd,
5421 Iterator fromEnd,
5422 Iterator position,
5423 ALLOCATOR allocator,
5425 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
5426 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
5427 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
5428 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
5429 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
5430 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06)
5431{
5432 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
5433 BLOCK_LENGTH,
5434 ALLOCATOR> ElementGuard;
5435
5436 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
5437 BLOCK_LENGTH> EndpointProctor;
5438
5439 size_type backSize = fromEnd - position;
5440 Iterator end = fromEnd;
5441 Iterator dest = end + 1;
5442
5443 BSLS_ASSERT_SAFE(backSize >= 1);
5444
5445 ElementGuard guard(dest, dest, allocator);
5446
5447
5448 --dest;
5449 --end;
5451 allocator,
5452 dest.valuePtr(),
5453 MoveUtil::move_if_noexcept(*end));
5454 guard.moveBegin(-1);
5455
5456
5457 size_type n = 0;
5458 for (backSize -= 1; 0 < backSize; --backSize) {
5459 --dest;
5460 --end;
5461 *dest = MoveUtil::move_if_noexcept(*end);
5462 ++n;
5463 }
5464 guard.moveBegin(-n);
5465
5466
5467 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, position.valuePtr());
5468
5469
5470
5471 EndpointProctor endpointProctor(toEnd, position);
5472
5474 allocator,
5475 position.valuePtr(),
5476 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
5477 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
5478 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
5479 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
5480 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
5481 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06));
5482
5483 endpointProctor.release();
5484 guard.release();
5485
5486 *toEnd = fromEnd + 1;
5487}
5488#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 6
5489
5490#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 7
5491template <class VALUE_TYPE, int BLOCK_LENGTH>
5492template <class ALLOCATOR, class Args_01,
5493 class Args_02,
5494 class Args_03,
5495 class Args_04,
5496 class Args_05,
5497 class Args_06,
5498 class Args_07>
5499void
5501 Iterator *toEnd,
5502 Iterator fromEnd,
5503 Iterator position,
5504 ALLOCATOR allocator,
5506 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
5507 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
5508 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
5509 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
5510 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
5511 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
5512 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07)
5513{
5514 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
5515 BLOCK_LENGTH,
5516 ALLOCATOR> ElementGuard;
5517
5518 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
5519 BLOCK_LENGTH> EndpointProctor;
5520
5521 size_type backSize = fromEnd - position;
5522 Iterator end = fromEnd;
5523 Iterator dest = end + 1;
5524
5525 BSLS_ASSERT_SAFE(backSize >= 1);
5526
5527 ElementGuard guard(dest, dest, allocator);
5528
5529
5530 --dest;
5531 --end;
5533 allocator,
5534 dest.valuePtr(),
5535 MoveUtil::move_if_noexcept(*end));
5536 guard.moveBegin(-1);
5537
5538
5539 size_type n = 0;
5540 for (backSize -= 1; 0 < backSize; --backSize) {
5541 --dest;
5542 --end;
5543 *dest = MoveUtil::move_if_noexcept(*end);
5544 ++n;
5545 }
5546 guard.moveBegin(-n);
5547
5548
5549 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, position.valuePtr());
5550
5551
5552
5553 EndpointProctor endpointProctor(toEnd, position);
5554
5556 allocator,
5557 position.valuePtr(),
5558 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
5559 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
5560 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
5561 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
5562 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
5563 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
5564 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07));
5565
5566 endpointProctor.release();
5567 guard.release();
5568
5569 *toEnd = fromEnd + 1;
5570}
5571#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 7
5572
5573#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 8
5574template <class VALUE_TYPE, int BLOCK_LENGTH>
5575template <class ALLOCATOR, class Args_01,
5576 class Args_02,
5577 class Args_03,
5578 class Args_04,
5579 class Args_05,
5580 class Args_06,
5581 class Args_07,
5582 class Args_08>
5583void
5585 Iterator *toEnd,
5586 Iterator fromEnd,
5587 Iterator position,
5588 ALLOCATOR allocator,
5590 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
5591 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
5592 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
5593 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
5594 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
5595 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
5596 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
5597 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08)
5598{
5599 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
5600 BLOCK_LENGTH,
5601 ALLOCATOR> ElementGuard;
5602
5603 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
5604 BLOCK_LENGTH> EndpointProctor;
5605
5606 size_type backSize = fromEnd - position;
5607 Iterator end = fromEnd;
5608 Iterator dest = end + 1;
5609
5610 BSLS_ASSERT_SAFE(backSize >= 1);
5611
5612 ElementGuard guard(dest, dest, allocator);
5613
5614
5615 --dest;
5616 --end;
5618 allocator,
5619 dest.valuePtr(),
5620 MoveUtil::move_if_noexcept(*end));
5621 guard.moveBegin(-1);
5622
5623
5624 size_type n = 0;
5625 for (backSize -= 1; 0 < backSize; --backSize) {
5626 --dest;
5627 --end;
5628 *dest = MoveUtil::move_if_noexcept(*end);
5629 ++n;
5630 }
5631 guard.moveBegin(-n);
5632
5633
5634 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, position.valuePtr());
5635
5636
5637
5638 EndpointProctor endpointProctor(toEnd, position);
5639
5641 allocator,
5642 position.valuePtr(),
5643 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
5644 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
5645 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
5646 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
5647 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
5648 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
5649 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
5650 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08));
5651
5652 endpointProctor.release();
5653 guard.release();
5654
5655 *toEnd = fromEnd + 1;
5656}
5657#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 8
5658
5659#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 9
5660template <class VALUE_TYPE, int BLOCK_LENGTH>
5661template <class ALLOCATOR, class Args_01,
5662 class Args_02,
5663 class Args_03,
5664 class Args_04,
5665 class Args_05,
5666 class Args_06,
5667 class Args_07,
5668 class Args_08,
5669 class Args_09>
5670void
5672 Iterator *toEnd,
5673 Iterator fromEnd,
5674 Iterator position,
5675 ALLOCATOR allocator,
5677 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
5678 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
5679 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
5680 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
5681 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
5682 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
5683 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
5684 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
5685 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09)
5686{
5687 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
5688 BLOCK_LENGTH,
5689 ALLOCATOR> ElementGuard;
5690
5691 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
5692 BLOCK_LENGTH> EndpointProctor;
5693
5694 size_type backSize = fromEnd - position;
5695 Iterator end = fromEnd;
5696 Iterator dest = end + 1;
5697
5698 BSLS_ASSERT_SAFE(backSize >= 1);
5699
5700 ElementGuard guard(dest, dest, allocator);
5701
5702
5703 --dest;
5704 --end;
5706 allocator,
5707 dest.valuePtr(),
5708 MoveUtil::move_if_noexcept(*end));
5709 guard.moveBegin(-1);
5710
5711
5712 size_type n = 0;
5713 for (backSize -= 1; 0 < backSize; --backSize) {
5714 --dest;
5715 --end;
5716 *dest = MoveUtil::move_if_noexcept(*end);
5717 ++n;
5718 }
5719 guard.moveBegin(-n);
5720
5721
5722 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, position.valuePtr());
5723
5724
5725
5726 EndpointProctor endpointProctor(toEnd, position);
5727
5729 allocator,
5730 position.valuePtr(),
5731 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
5732 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
5733 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
5734 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
5735 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
5736 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
5737 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
5738 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
5739 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09));
5740
5741 endpointProctor.release();
5742 guard.release();
5743
5744 *toEnd = fromEnd + 1;
5745}
5746#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 9
5747
5748#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 10
5749template <class VALUE_TYPE, int BLOCK_LENGTH>
5750template <class ALLOCATOR, class Args_01,
5751 class Args_02,
5752 class Args_03,
5753 class Args_04,
5754 class Args_05,
5755 class Args_06,
5756 class Args_07,
5757 class Args_08,
5758 class Args_09,
5759 class Args_10>
5760void
5762 Iterator *toEnd,
5763 Iterator fromEnd,
5764 Iterator position,
5765 ALLOCATOR allocator,
5767 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
5768 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
5769 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
5770 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
5771 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
5772 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
5773 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
5774 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
5775 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09,
5776 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) arguments_10)
5777{
5778 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
5779 BLOCK_LENGTH,
5780 ALLOCATOR> ElementGuard;
5781
5782 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
5783 BLOCK_LENGTH> EndpointProctor;
5784
5785 size_type backSize = fromEnd - position;
5786 Iterator end = fromEnd;
5787 Iterator dest = end + 1;
5788
5789 BSLS_ASSERT_SAFE(backSize >= 1);
5790
5791 ElementGuard guard(dest, dest, allocator);
5792
5793
5794 --dest;
5795 --end;
5797 allocator,
5798 dest.valuePtr(),
5799 MoveUtil::move_if_noexcept(*end));
5800 guard.moveBegin(-1);
5801
5802
5803 size_type n = 0;
5804 for (backSize -= 1; 0 < backSize; --backSize) {
5805 --dest;
5806 --end;
5807 *dest = MoveUtil::move_if_noexcept(*end);
5808 ++n;
5809 }
5810 guard.moveBegin(-n);
5811
5812
5813 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, position.valuePtr());
5814
5815
5816
5817 EndpointProctor endpointProctor(toEnd, position);
5818
5820 allocator,
5821 position.valuePtr(),
5822 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
5823 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
5824 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
5825 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
5826 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
5827 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
5828 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
5829 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
5830 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09),
5831 BSLS_COMPILERFEATURES_FORWARD(Args_10, arguments_10));
5832
5833 endpointProctor.release();
5834 guard.release();
5835
5836 *toEnd = fromEnd + 1;
5837}
5838#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 10
5839
5840
5841#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 0
5842template <class VALUE_TYPE, int BLOCK_LENGTH>
5843template <class ALLOCATOR>
5844inline
5845void
5847 Iterator *toBegin,
5848 Iterator fromBegin,
5849 Iterator position,
5850 ALLOCATOR allocator)
5851{
5852 enum {
5855
5856 VALUE = IS_BITWISECOPYABLE
5857 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
5858 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
5859 };
5860
5861 emplaceAndMoveToFrontDispatch(
5862 toBegin,
5863 fromBegin,
5864 position,
5865 allocator,
5867}
5868#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 0
5869
5870#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 1
5871template <class VALUE_TYPE, int BLOCK_LENGTH>
5872template <class ALLOCATOR, class Args_01>
5873inline
5874void
5876 Iterator *toBegin,
5877 Iterator fromBegin,
5878 Iterator position,
5879 ALLOCATOR allocator,
5880 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01)
5881{
5882 enum {
5885
5886 VALUE = IS_BITWISECOPYABLE
5887 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
5888 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
5889 };
5890
5891 emplaceAndMoveToFrontDispatch(
5892 toBegin,
5893 fromBegin,
5894 position,
5895 allocator,
5897 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01));
5898}
5899#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 1
5900
5901#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 2
5902template <class VALUE_TYPE, int BLOCK_LENGTH>
5903template <class ALLOCATOR, class Args_01,
5904 class Args_02>
5905inline
5906void
5908 Iterator *toBegin,
5909 Iterator fromBegin,
5910 Iterator position,
5911 ALLOCATOR allocator,
5912 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
5913 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02)
5914{
5915 enum {
5918
5919 VALUE = IS_BITWISECOPYABLE
5920 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
5921 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
5922 };
5923
5924 emplaceAndMoveToFrontDispatch(
5925 toBegin,
5926 fromBegin,
5927 position,
5928 allocator,
5930 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
5931 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02));
5932}
5933#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 2
5934
5935#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 3
5936template <class VALUE_TYPE, int BLOCK_LENGTH>
5937template <class ALLOCATOR, class Args_01,
5938 class Args_02,
5939 class Args_03>
5940inline
5941void
5943 Iterator *toBegin,
5944 Iterator fromBegin,
5945 Iterator position,
5946 ALLOCATOR allocator,
5947 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
5948 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
5949 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03)
5950{
5951 enum {
5954
5955 VALUE = IS_BITWISECOPYABLE
5956 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
5957 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
5958 };
5959
5960 emplaceAndMoveToFrontDispatch(
5961 toBegin,
5962 fromBegin,
5963 position,
5964 allocator,
5966 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
5967 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
5968 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03));
5969}
5970#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 3
5971
5972#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 4
5973template <class VALUE_TYPE, int BLOCK_LENGTH>
5974template <class ALLOCATOR, class Args_01,
5975 class Args_02,
5976 class Args_03,
5977 class Args_04>
5978inline
5979void
5981 Iterator *toBegin,
5982 Iterator fromBegin,
5983 Iterator position,
5984 ALLOCATOR allocator,
5985 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
5986 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
5987 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
5988 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04)
5989{
5990 enum {
5993
5994 VALUE = IS_BITWISECOPYABLE
5995 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
5996 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
5997 };
5998
5999 emplaceAndMoveToFrontDispatch(
6000 toBegin,
6001 fromBegin,
6002 position,
6003 allocator,
6005 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6006 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
6007 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
6008 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04));
6009}
6010#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 4
6011
6012#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 5
6013template <class VALUE_TYPE, int BLOCK_LENGTH>
6014template <class ALLOCATOR, class Args_01,
6015 class Args_02,
6016 class Args_03,
6017 class Args_04,
6018 class Args_05>
6019inline
6020void
6022 Iterator *toBegin,
6023 Iterator fromBegin,
6024 Iterator position,
6025 ALLOCATOR allocator,
6026 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6027 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
6028 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
6029 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
6030 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05)
6031{
6032 enum {
6035
6036 VALUE = IS_BITWISECOPYABLE
6037 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
6038 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
6039 };
6040
6041 emplaceAndMoveToFrontDispatch(
6042 toBegin,
6043 fromBegin,
6044 position,
6045 allocator,
6047 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6048 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
6049 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
6050 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
6051 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05));
6052}
6053#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 5
6054
6055#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 6
6056template <class VALUE_TYPE, int BLOCK_LENGTH>
6057template <class ALLOCATOR, class Args_01,
6058 class Args_02,
6059 class Args_03,
6060 class Args_04,
6061 class Args_05,
6062 class Args_06>
6063inline
6064void
6066 Iterator *toBegin,
6067 Iterator fromBegin,
6068 Iterator position,
6069 ALLOCATOR allocator,
6070 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6071 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
6072 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
6073 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
6074 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
6075 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06)
6076{
6077 enum {
6080
6081 VALUE = IS_BITWISECOPYABLE
6082 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
6083 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
6084 };
6085
6086 emplaceAndMoveToFrontDispatch(
6087 toBegin,
6088 fromBegin,
6089 position,
6090 allocator,
6092 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6093 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
6094 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
6095 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
6096 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
6097 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06));
6098}
6099#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 6
6100
6101#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 7
6102template <class VALUE_TYPE, int BLOCK_LENGTH>
6103template <class ALLOCATOR, class Args_01,
6104 class Args_02,
6105 class Args_03,
6106 class Args_04,
6107 class Args_05,
6108 class Args_06,
6109 class Args_07>
6110inline
6111void
6113 Iterator *toBegin,
6114 Iterator fromBegin,
6115 Iterator position,
6116 ALLOCATOR allocator,
6117 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6118 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
6119 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
6120 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
6121 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
6122 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
6123 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07)
6124{
6125 enum {
6128
6129 VALUE = IS_BITWISECOPYABLE
6130 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
6131 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
6132 };
6133
6134 emplaceAndMoveToFrontDispatch(
6135 toBegin,
6136 fromBegin,
6137 position,
6138 allocator,
6140 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6141 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
6142 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
6143 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
6144 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
6145 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
6146 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07));
6147}
6148#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 7
6149
6150#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 8
6151template <class VALUE_TYPE, int BLOCK_LENGTH>
6152template <class ALLOCATOR, class Args_01,
6153 class Args_02,
6154 class Args_03,
6155 class Args_04,
6156 class Args_05,
6157 class Args_06,
6158 class Args_07,
6159 class Args_08>
6160inline
6161void
6163 Iterator *toBegin,
6164 Iterator fromBegin,
6165 Iterator position,
6166 ALLOCATOR allocator,
6167 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6168 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
6169 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
6170 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
6171 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
6172 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
6173 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
6174 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08)
6175{
6176 enum {
6179
6180 VALUE = IS_BITWISECOPYABLE
6181 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
6182 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
6183 };
6184
6185 emplaceAndMoveToFrontDispatch(
6186 toBegin,
6187 fromBegin,
6188 position,
6189 allocator,
6191 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6192 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
6193 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
6194 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
6195 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
6196 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
6197 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
6198 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08));
6199}
6200#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 8
6201
6202#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 9
6203template <class VALUE_TYPE, int BLOCK_LENGTH>
6204template <class ALLOCATOR, class Args_01,
6205 class Args_02,
6206 class Args_03,
6207 class Args_04,
6208 class Args_05,
6209 class Args_06,
6210 class Args_07,
6211 class Args_08,
6212 class Args_09>
6213inline
6214void
6216 Iterator *toBegin,
6217 Iterator fromBegin,
6218 Iterator position,
6219 ALLOCATOR allocator,
6220 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6221 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
6222 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
6223 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
6224 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
6225 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
6226 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
6227 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
6228 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09)
6229{
6230 enum {
6233
6234 VALUE = IS_BITWISECOPYABLE
6235 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
6236 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
6237 };
6238
6239 emplaceAndMoveToFrontDispatch(
6240 toBegin,
6241 fromBegin,
6242 position,
6243 allocator,
6245 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6246 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
6247 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
6248 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
6249 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
6250 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
6251 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
6252 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
6253 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09));
6254}
6255#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 9
6256
6257#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 10
6258template <class VALUE_TYPE, int BLOCK_LENGTH>
6259template <class ALLOCATOR, class Args_01,
6260 class Args_02,
6261 class Args_03,
6262 class Args_04,
6263 class Args_05,
6264 class Args_06,
6265 class Args_07,
6266 class Args_08,
6267 class Args_09,
6268 class Args_10>
6269inline
6270void
6272 Iterator *toBegin,
6273 Iterator fromBegin,
6274 Iterator position,
6275 ALLOCATOR allocator,
6276 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6277 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
6278 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
6279 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
6280 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
6281 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
6282 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
6283 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
6284 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09,
6285 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) arguments_10)
6286{
6287 enum {
6290
6291 VALUE = IS_BITWISECOPYABLE
6292 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
6293 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
6294 };
6295
6296 emplaceAndMoveToFrontDispatch(
6297 toBegin,
6298 fromBegin,
6299 position,
6300 allocator,
6302 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6303 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
6304 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
6305 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
6306 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
6307 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
6308 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
6309 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
6310 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09),
6311 BSLS_COMPILERFEATURES_FORWARD(Args_10, arguments_10));
6312}
6313#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 10
6314
6315
6316#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 0
6317template <class VALUE_TYPE, int BLOCK_LENGTH>
6318template <class ALLOCATOR>
6319void
6321 Iterator *toBegin,
6322 Iterator fromBegin,
6323 Iterator position,
6324 ALLOCATOR allocator,
6326{
6327 const size_type frontSize = position - fromBegin;
6328 Iterator begin = fromBegin;
6329 Iterator dest = begin - 1;
6330
6331
6332 moveFront(&dest, &begin, frontSize);
6333
6335 allocator,
6336 dest.valuePtr());
6337
6338 *toBegin = fromBegin - 1;
6339}
6340#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 0
6341
6342#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 1
6343template <class VALUE_TYPE, int BLOCK_LENGTH>
6344template <class ALLOCATOR, class Args_01>
6345void
6347 Iterator *toBegin,
6348 Iterator fromBegin,
6349 Iterator position,
6350 ALLOCATOR allocator,
6352 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01)
6353{
6354 const size_type frontSize = position - fromBegin;
6355 Iterator begin = fromBegin;
6356 Iterator dest = begin - 1;
6357
6358
6359 moveFront(&dest, &begin, frontSize);
6360
6362 allocator,
6363 dest.valuePtr(),
6364 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01));
6365
6366 *toBegin = fromBegin - 1;
6367}
6368#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 1
6369
6370#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 2
6371template <class VALUE_TYPE, int BLOCK_LENGTH>
6372template <class ALLOCATOR, class Args_01,
6373 class Args_02>
6374void
6376 Iterator *toBegin,
6377 Iterator fromBegin,
6378 Iterator position,
6379 ALLOCATOR allocator,
6381 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6382 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02)
6383{
6384 const size_type frontSize = position - fromBegin;
6385 Iterator begin = fromBegin;
6386 Iterator dest = begin - 1;
6387
6388
6389 moveFront(&dest, &begin, frontSize);
6390
6392 allocator,
6393 dest.valuePtr(),
6394 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6395 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02));
6396
6397 *toBegin = fromBegin - 1;
6398}
6399#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 2
6400
6401#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 3
6402template <class VALUE_TYPE, int BLOCK_LENGTH>
6403template <class ALLOCATOR, class Args_01,
6404 class Args_02,
6405 class Args_03>
6406void
6408 Iterator *toBegin,
6409 Iterator fromBegin,
6410 Iterator position,
6411 ALLOCATOR allocator,
6413 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6414 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
6415 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03)
6416{
6417 const size_type frontSize = position - fromBegin;
6418 Iterator begin = fromBegin;
6419 Iterator dest = begin - 1;
6420
6421
6422 moveFront(&dest, &begin, frontSize);
6423
6425 allocator,
6426 dest.valuePtr(),
6427 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6428 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
6429 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03));
6430
6431 *toBegin = fromBegin - 1;
6432}
6433#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 3
6434
6435#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 4
6436template <class VALUE_TYPE, int BLOCK_LENGTH>
6437template <class ALLOCATOR, class Args_01,
6438 class Args_02,
6439 class Args_03,
6440 class Args_04>
6441void
6443 Iterator *toBegin,
6444 Iterator fromBegin,
6445 Iterator position,
6446 ALLOCATOR allocator,
6448 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6449 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
6450 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
6451 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04)
6452{
6453 const size_type frontSize = position - fromBegin;
6454 Iterator begin = fromBegin;
6455 Iterator dest = begin - 1;
6456
6457
6458 moveFront(&dest, &begin, frontSize);
6459
6461 allocator,
6462 dest.valuePtr(),
6463 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6464 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
6465 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
6466 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04));
6467
6468 *toBegin = fromBegin - 1;
6469}
6470#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 4
6471
6472#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 5
6473template <class VALUE_TYPE, int BLOCK_LENGTH>
6474template <class ALLOCATOR, class Args_01,
6475 class Args_02,
6476 class Args_03,
6477 class Args_04,
6478 class Args_05>
6479void
6481 Iterator *toBegin,
6482 Iterator fromBegin,
6483 Iterator position,
6484 ALLOCATOR allocator,
6486 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6487 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
6488 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
6489 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
6490 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05)
6491{
6492 const size_type frontSize = position - fromBegin;
6493 Iterator begin = fromBegin;
6494 Iterator dest = begin - 1;
6495
6496
6497 moveFront(&dest, &begin, frontSize);
6498
6500 allocator,
6501 dest.valuePtr(),
6502 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6503 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
6504 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
6505 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
6506 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05));
6507
6508 *toBegin = fromBegin - 1;
6509}
6510#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 5
6511
6512#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 6
6513template <class VALUE_TYPE, int BLOCK_LENGTH>
6514template <class ALLOCATOR, class Args_01,
6515 class Args_02,
6516 class Args_03,
6517 class Args_04,
6518 class Args_05,
6519 class Args_06>
6520void
6522 Iterator *toBegin,
6523 Iterator fromBegin,
6524 Iterator position,
6525 ALLOCATOR allocator,
6527 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6528 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
6529 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
6530 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
6531 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
6532 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06)
6533{
6534 const size_type frontSize = position - fromBegin;
6535 Iterator begin = fromBegin;
6536 Iterator dest = begin - 1;
6537
6538
6539 moveFront(&dest, &begin, frontSize);
6540
6542 allocator,
6543 dest.valuePtr(),
6544 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6545 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
6546 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
6547 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
6548 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
6549 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06));
6550
6551 *toBegin = fromBegin - 1;
6552}
6553#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 6
6554
6555#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 7
6556template <class VALUE_TYPE, int BLOCK_LENGTH>
6557template <class ALLOCATOR, class Args_01,
6558 class Args_02,
6559 class Args_03,
6560 class Args_04,
6561 class Args_05,
6562 class Args_06,
6563 class Args_07>
6564void
6566 Iterator *toBegin,
6567 Iterator fromBegin,
6568 Iterator position,
6569 ALLOCATOR allocator,
6571 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6572 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
6573 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
6574 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
6575 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
6576 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
6577 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07)
6578{
6579 const size_type frontSize = position - fromBegin;
6580 Iterator begin = fromBegin;
6581 Iterator dest = begin - 1;
6582
6583
6584 moveFront(&dest, &begin, frontSize);
6585
6587 allocator,
6588 dest.valuePtr(),
6589 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6590 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
6591 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
6592 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
6593 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
6594 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
6595 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07));
6596
6597 *toBegin = fromBegin - 1;
6598}
6599#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 7
6600
6601#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 8
6602template <class VALUE_TYPE, int BLOCK_LENGTH>
6603template <class ALLOCATOR, class Args_01,
6604 class Args_02,
6605 class Args_03,
6606 class Args_04,
6607 class Args_05,
6608 class Args_06,
6609 class Args_07,
6610 class Args_08>
6611void
6613 Iterator *toBegin,
6614 Iterator fromBegin,
6615 Iterator position,
6616 ALLOCATOR allocator,
6618 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6619 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
6620 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
6621 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
6622 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
6623 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
6624 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
6625 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08)
6626{
6627 const size_type frontSize = position - fromBegin;
6628 Iterator begin = fromBegin;
6629 Iterator dest = begin - 1;
6630
6631
6632 moveFront(&dest, &begin, frontSize);
6633
6635 allocator,
6636 dest.valuePtr(),
6637 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6638 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
6639 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
6640 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
6641 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
6642 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
6643 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
6644 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08));
6645
6646 *toBegin = fromBegin - 1;
6647}
6648#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 8
6649
6650#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 9
6651template <class VALUE_TYPE, int BLOCK_LENGTH>
6652template <class ALLOCATOR, class Args_01,
6653 class Args_02,
6654 class Args_03,
6655 class Args_04,
6656 class Args_05,
6657 class Args_06,
6658 class Args_07,
6659 class Args_08,
6660 class Args_09>
6661void
6663 Iterator *toBegin,
6664 Iterator fromBegin,
6665 Iterator position,
6666 ALLOCATOR allocator,
6668 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6669 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
6670 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
6671 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
6672 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
6673 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
6674 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
6675 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
6676 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09)
6677{
6678 const size_type frontSize = position - fromBegin;
6679 Iterator begin = fromBegin;
6680 Iterator dest = begin - 1;
6681
6682
6683 moveFront(&dest, &begin, frontSize);
6684
6686 allocator,
6687 dest.valuePtr(),
6688 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6689 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
6690 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
6691 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
6692 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
6693 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
6694 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
6695 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
6696 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09));
6697
6698 *toBegin = fromBegin - 1;
6699}
6700#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 9
6701
6702#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 10
6703template <class VALUE_TYPE, int BLOCK_LENGTH>
6704template <class ALLOCATOR, class Args_01,
6705 class Args_02,
6706 class Args_03,
6707 class Args_04,
6708 class Args_05,
6709 class Args_06,
6710 class Args_07,
6711 class Args_08,
6712 class Args_09,
6713 class Args_10>
6714void
6716 Iterator *toBegin,
6717 Iterator fromBegin,
6718 Iterator position,
6719 ALLOCATOR allocator,
6721 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6722 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
6723 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
6724 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
6725 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
6726 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
6727 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
6728 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
6729 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09,
6730 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) arguments_10)
6731{
6732 const size_type frontSize = position - fromBegin;
6733 Iterator begin = fromBegin;
6734 Iterator dest = begin - 1;
6735
6736
6737 moveFront(&dest, &begin, frontSize);
6738
6740 allocator,
6741 dest.valuePtr(),
6742 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6743 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
6744 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
6745 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
6746 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
6747 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
6748 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
6749 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
6750 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09),
6751 BSLS_COMPILERFEATURES_FORWARD(Args_10, arguments_10));
6752
6753 *toBegin = fromBegin - 1;
6754}
6755#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 10
6756
6757
6758#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 0
6759template <class VALUE_TYPE, int BLOCK_LENGTH>
6760template <class ALLOCATOR>
6761void
6763 Iterator *toBegin,
6764 Iterator fromBegin,
6765 Iterator position,
6766 ALLOCATOR allocator,
6768{
6769 const size_type frontSize = position - fromBegin;
6770 Iterator begin = fromBegin;
6771 Iterator dest = begin - 1;
6772
6773
6774 MoveGuard guard(begin, dest, frontSize, true);
6775
6776 moveFront(&dest, &begin, frontSize);
6777
6779 allocator,
6780 dest.valuePtr());
6781
6782 guard.release();
6783
6784 *toBegin = fromBegin - 1;
6785}
6786#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 0
6787
6788#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 1
6789template <class VALUE_TYPE, int BLOCK_LENGTH>
6790template <class ALLOCATOR, class Args_01>
6791void
6793 Iterator *toBegin,
6794 Iterator fromBegin,
6795 Iterator position,
6796 ALLOCATOR allocator,
6798 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01)
6799{
6800 const size_type frontSize = position - fromBegin;
6801 Iterator begin = fromBegin;
6802 Iterator dest = begin - 1;
6803
6804
6805 MoveGuard guard(begin, dest, frontSize, true);
6806
6807 moveFront(&dest, &begin, frontSize);
6808
6810 allocator,
6811 dest.valuePtr(),
6812 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01));
6813
6814 guard.release();
6815
6816 *toBegin = fromBegin - 1;
6817}
6818#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 1
6819
6820#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 2
6821template <class VALUE_TYPE, int BLOCK_LENGTH>
6822template <class ALLOCATOR, class Args_01,
6823 class Args_02>
6824void
6826 Iterator *toBegin,
6827 Iterator fromBegin,
6828 Iterator position,
6829 ALLOCATOR allocator,
6831 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6832 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02)
6833{
6834 const size_type frontSize = position - fromBegin;
6835 Iterator begin = fromBegin;
6836 Iterator dest = begin - 1;
6837
6838
6839 MoveGuard guard(begin, dest, frontSize, true);
6840
6841 moveFront(&dest, &begin, frontSize);
6842
6844 allocator,
6845 dest.valuePtr(),
6846 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6847 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02));
6848
6849 guard.release();
6850
6851 *toBegin = fromBegin - 1;
6852}
6853#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 2
6854
6855#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 3
6856template <class VALUE_TYPE, int BLOCK_LENGTH>
6857template <class ALLOCATOR, class Args_01,
6858 class Args_02,
6859 class Args_03>
6860void
6862 Iterator *toBegin,
6863 Iterator fromBegin,
6864 Iterator position,
6865 ALLOCATOR allocator,
6867 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6868 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
6869 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03)
6870{
6871 const size_type frontSize = position - fromBegin;
6872 Iterator begin = fromBegin;
6873 Iterator dest = begin - 1;
6874
6875
6876 MoveGuard guard(begin, dest, frontSize, true);
6877
6878 moveFront(&dest, &begin, frontSize);
6879
6881 allocator,
6882 dest.valuePtr(),
6883 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6884 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
6885 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03));
6886
6887 guard.release();
6888
6889 *toBegin = fromBegin - 1;
6890}
6891#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 3
6892
6893#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 4
6894template <class VALUE_TYPE, int BLOCK_LENGTH>
6895template <class ALLOCATOR, class Args_01,
6896 class Args_02,
6897 class Args_03,
6898 class Args_04>
6899void
6901 Iterator *toBegin,
6902 Iterator fromBegin,
6903 Iterator position,
6904 ALLOCATOR allocator,
6906 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6907 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
6908 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
6909 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04)
6910{
6911 const size_type frontSize = position - fromBegin;
6912 Iterator begin = fromBegin;
6913 Iterator dest = begin - 1;
6914
6915
6916 MoveGuard guard(begin, dest, frontSize, true);
6917
6918 moveFront(&dest, &begin, frontSize);
6919
6921 allocator,
6922 dest.valuePtr(),
6923 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6924 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
6925 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
6926 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04));
6927
6928 guard.release();
6929
6930 *toBegin = fromBegin - 1;
6931}
6932#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 4
6933
6934#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 5
6935template <class VALUE_TYPE, int BLOCK_LENGTH>
6936template <class ALLOCATOR, class Args_01,
6937 class Args_02,
6938 class Args_03,
6939 class Args_04,
6940 class Args_05>
6941void
6943 Iterator *toBegin,
6944 Iterator fromBegin,
6945 Iterator position,
6946 ALLOCATOR allocator,
6948 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6949 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
6950 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
6951 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
6952 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05)
6953{
6954 const size_type frontSize = position - fromBegin;
6955 Iterator begin = fromBegin;
6956 Iterator dest = begin - 1;
6957
6958
6959 MoveGuard guard(begin, dest, frontSize, true);
6960
6961 moveFront(&dest, &begin, frontSize);
6962
6964 allocator,
6965 dest.valuePtr(),
6966 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
6967 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
6968 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
6969 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
6970 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05));
6971
6972 guard.release();
6973
6974 *toBegin = fromBegin - 1;
6975}
6976#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 5
6977
6978#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 6
6979template <class VALUE_TYPE, int BLOCK_LENGTH>
6980template <class ALLOCATOR, class Args_01,
6981 class Args_02,
6982 class Args_03,
6983 class Args_04,
6984 class Args_05,
6985 class Args_06>
6986void
6988 Iterator *toBegin,
6989 Iterator fromBegin,
6990 Iterator position,
6991 ALLOCATOR allocator,
6993 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
6994 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
6995 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
6996 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
6997 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
6998 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06)
6999{
7000 const size_type frontSize = position - fromBegin;
7001 Iterator begin = fromBegin;
7002 Iterator dest = begin - 1;
7003
7004
7005 MoveGuard guard(begin, dest, frontSize, true);
7006
7007 moveFront(&dest, &begin, frontSize);
7008
7010 allocator,
7011 dest.valuePtr(),
7012 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
7013 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
7014 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
7015 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
7016 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
7017 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06));
7018
7019 guard.release();
7020
7021 *toBegin = fromBegin - 1;
7022}
7023#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 6
7024
7025#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 7
7026template <class VALUE_TYPE, int BLOCK_LENGTH>
7027template <class ALLOCATOR, class Args_01,
7028 class Args_02,
7029 class Args_03,
7030 class Args_04,
7031 class Args_05,
7032 class Args_06,
7033 class Args_07>
7034void
7036 Iterator *toBegin,
7037 Iterator fromBegin,
7038 Iterator position,
7039 ALLOCATOR allocator,
7041 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
7042 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
7043 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
7044 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
7045 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
7046 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
7047 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07)
7048{
7049 const size_type frontSize = position - fromBegin;
7050 Iterator begin = fromBegin;
7051 Iterator dest = begin - 1;
7052
7053
7054 MoveGuard guard(begin, dest, frontSize, true);
7055
7056 moveFront(&dest, &begin, frontSize);
7057
7059 allocator,
7060 dest.valuePtr(),
7061 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
7062 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
7063 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
7064 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
7065 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
7066 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
7067 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07));
7068
7069 guard.release();
7070
7071 *toBegin = fromBegin - 1;
7072}
7073#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 7
7074
7075#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 8
7076template <class VALUE_TYPE, int BLOCK_LENGTH>
7077template <class ALLOCATOR, class Args_01,
7078 class Args_02,
7079 class Args_03,
7080 class Args_04,
7081 class Args_05,
7082 class Args_06,
7083 class Args_07,
7084 class Args_08>
7085void
7087 Iterator *toBegin,
7088 Iterator fromBegin,
7089 Iterator position,
7090 ALLOCATOR allocator,
7092 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
7093 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
7094 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
7095 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
7096 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
7097 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
7098 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
7099 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08)
7100{
7101 const size_type frontSize = position - fromBegin;
7102 Iterator begin = fromBegin;
7103 Iterator dest = begin - 1;
7104
7105
7106 MoveGuard guard(begin, dest, frontSize, true);
7107
7108 moveFront(&dest, &begin, frontSize);
7109
7111 allocator,
7112 dest.valuePtr(),
7113 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
7114 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
7115 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
7116 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
7117 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
7118 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
7119 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
7120 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08));
7121
7122 guard.release();
7123
7124 *toBegin = fromBegin - 1;
7125}
7126#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 8
7127
7128#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 9
7129template <class VALUE_TYPE, int BLOCK_LENGTH>
7130template <class ALLOCATOR, class Args_01,
7131 class Args_02,
7132 class Args_03,
7133 class Args_04,
7134 class Args_05,
7135 class Args_06,
7136 class Args_07,
7137 class Args_08,
7138 class Args_09>
7139void
7141 Iterator *toBegin,
7142 Iterator fromBegin,
7143 Iterator position,
7144 ALLOCATOR allocator,
7146 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
7147 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
7148 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
7149 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
7150 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
7151 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
7152 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
7153 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
7154 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09)
7155{
7156 const size_type frontSize = position - fromBegin;
7157 Iterator begin = fromBegin;
7158 Iterator dest = begin - 1;
7159
7160
7161 MoveGuard guard(begin, dest, frontSize, true);
7162
7163 moveFront(&dest, &begin, frontSize);
7164
7166 allocator,
7167 dest.valuePtr(),
7168 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
7169 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
7170 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
7171 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
7172 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
7173 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
7174 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
7175 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
7176 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09));
7177
7178 guard.release();
7179
7180 *toBegin = fromBegin - 1;
7181}
7182#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 9
7183
7184#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 10
7185template <class VALUE_TYPE, int BLOCK_LENGTH>
7186template <class ALLOCATOR, class Args_01,
7187 class Args_02,
7188 class Args_03,
7189 class Args_04,
7190 class Args_05,
7191 class Args_06,
7192 class Args_07,
7193 class Args_08,
7194 class Args_09,
7195 class Args_10>
7196void
7198 Iterator *toBegin,
7199 Iterator fromBegin,
7200 Iterator position,
7201 ALLOCATOR allocator,
7203 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
7204 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
7205 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
7206 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
7207 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
7208 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
7209 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
7210 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
7211 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09,
7212 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) arguments_10)
7213{
7214 const size_type frontSize = position - fromBegin;
7215 Iterator begin = fromBegin;
7216 Iterator dest = begin - 1;
7217
7218
7219 MoveGuard guard(begin, dest, frontSize, true);
7220
7221 moveFront(&dest, &begin, frontSize);
7222
7224 allocator,
7225 dest.valuePtr(),
7226 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
7227 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
7228 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
7229 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
7230 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
7231 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
7232 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
7233 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
7234 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09),
7235 BSLS_COMPILERFEATURES_FORWARD(Args_10, arguments_10));
7236
7237 guard.release();
7238
7239 *toBegin = fromBegin - 1;
7240}
7241#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 10
7242
7243
7244#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 0
7245template <class VALUE_TYPE, int BLOCK_LENGTH>
7246template <class ALLOCATOR>
7247void
7249 Iterator *toBegin,
7250 Iterator fromBegin,
7251 Iterator position,
7252 ALLOCATOR allocator,
7254{
7255 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
7256 BLOCK_LENGTH,
7257 ALLOCATOR> ElementGuard;
7258
7259 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
7260 BLOCK_LENGTH> EndpointProctor;
7261
7262 size_type frontSize = position - fromBegin;
7263 Iterator begin = fromBegin;
7264 Iterator dest = begin - 1;
7265
7266 BSLS_ASSERT_SAFE(frontSize >= 1);
7267
7268 ElementGuard guard(dest, dest, allocator);
7269
7270
7272 allocator,
7273 dest.valuePtr(),
7274 MoveUtil::move_if_noexcept(*begin));
7275 guard.moveEnd(1);
7276 ++dest;
7277 ++begin;
7278
7279
7280 size_type n = 0;
7281 for (frontSize -= 1; 0 < frontSize; --frontSize, ++dest, ++begin) {
7282 *dest = MoveUtil::move_if_noexcept(*begin);
7283 ++n;
7284 }
7285 guard.moveEnd(n);
7286
7287
7288 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, dest.valuePtr());
7289
7290
7291
7292 EndpointProctor endpointProctor(toBegin, position);
7293
7295 allocator,
7296 dest.valuePtr());
7297
7298 endpointProctor.release();
7299 guard.release();
7300
7301 *toBegin = fromBegin - 1;
7302}
7303#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 0
7304
7305#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 1
7306template <class VALUE_TYPE, int BLOCK_LENGTH>
7307template <class ALLOCATOR, class Args_01>
7308void
7310 Iterator *toBegin,
7311 Iterator fromBegin,
7312 Iterator position,
7313 ALLOCATOR allocator,
7315 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01)
7316{
7317 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
7318 BLOCK_LENGTH,
7319 ALLOCATOR> ElementGuard;
7320
7321 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
7322 BLOCK_LENGTH> EndpointProctor;
7323
7324 size_type frontSize = position - fromBegin;
7325 Iterator begin = fromBegin;
7326 Iterator dest = begin - 1;
7327
7328 BSLS_ASSERT_SAFE(frontSize >= 1);
7329
7330 ElementGuard guard(dest, dest, allocator);
7331
7332
7334 allocator,
7335 dest.valuePtr(),
7336 MoveUtil::move_if_noexcept(*begin));
7337 guard.moveEnd(1);
7338 ++dest;
7339 ++begin;
7340
7341
7342 size_type n = 0;
7343 for (frontSize -= 1; 0 < frontSize; --frontSize, ++dest, ++begin) {
7344 *dest = MoveUtil::move_if_noexcept(*begin);
7345 ++n;
7346 }
7347 guard.moveEnd(n);
7348
7349
7350 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, dest.valuePtr());
7351
7352
7353
7354 EndpointProctor endpointProctor(toBegin, position);
7355
7357 allocator,
7358 dest.valuePtr(),
7359 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01));
7360
7361 endpointProctor.release();
7362 guard.release();
7363
7364 *toBegin = fromBegin - 1;
7365}
7366#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 1
7367
7368#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 2
7369template <class VALUE_TYPE, int BLOCK_LENGTH>
7370template <class ALLOCATOR, class Args_01,
7371 class Args_02>
7372void
7374 Iterator *toBegin,
7375 Iterator fromBegin,
7376 Iterator position,
7377 ALLOCATOR allocator,
7379 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
7380 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02)
7381{
7382 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
7383 BLOCK_LENGTH,
7384 ALLOCATOR> ElementGuard;
7385
7386 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
7387 BLOCK_LENGTH> EndpointProctor;
7388
7389 size_type frontSize = position - fromBegin;
7390 Iterator begin = fromBegin;
7391 Iterator dest = begin - 1;
7392
7393 BSLS_ASSERT_SAFE(frontSize >= 1);
7394
7395 ElementGuard guard(dest, dest, allocator);
7396
7397
7399 allocator,
7400 dest.valuePtr(),
7401 MoveUtil::move_if_noexcept(*begin));
7402 guard.moveEnd(1);
7403 ++dest;
7404 ++begin;
7405
7406
7407 size_type n = 0;
7408 for (frontSize -= 1; 0 < frontSize; --frontSize, ++dest, ++begin) {
7409 *dest = MoveUtil::move_if_noexcept(*begin);
7410 ++n;
7411 }
7412 guard.moveEnd(n);
7413
7414
7415 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, dest.valuePtr());
7416
7417
7418
7419 EndpointProctor endpointProctor(toBegin, position);
7420
7422 allocator,
7423 dest.valuePtr(),
7424 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
7425 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02));
7426
7427 endpointProctor.release();
7428 guard.release();
7429
7430 *toBegin = fromBegin - 1;
7431}
7432#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 2
7433
7434#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 3
7435template <class VALUE_TYPE, int BLOCK_LENGTH>
7436template <class ALLOCATOR, class Args_01,
7437 class Args_02,
7438 class Args_03>
7439void
7441 Iterator *toBegin,
7442 Iterator fromBegin,
7443 Iterator position,
7444 ALLOCATOR allocator,
7446 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
7447 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
7448 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03)
7449{
7450 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
7451 BLOCK_LENGTH,
7452 ALLOCATOR> ElementGuard;
7453
7454 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
7455 BLOCK_LENGTH> EndpointProctor;
7456
7457 size_type frontSize = position - fromBegin;
7458 Iterator begin = fromBegin;
7459 Iterator dest = begin - 1;
7460
7461 BSLS_ASSERT_SAFE(frontSize >= 1);
7462
7463 ElementGuard guard(dest, dest, allocator);
7464
7465
7467 allocator,
7468 dest.valuePtr(),
7469 MoveUtil::move_if_noexcept(*begin));
7470 guard.moveEnd(1);
7471 ++dest;
7472 ++begin;
7473
7474
7475 size_type n = 0;
7476 for (frontSize -= 1; 0 < frontSize; --frontSize, ++dest, ++begin) {
7477 *dest = MoveUtil::move_if_noexcept(*begin);
7478 ++n;
7479 }
7480 guard.moveEnd(n);
7481
7482
7483 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, dest.valuePtr());
7484
7485
7486
7487 EndpointProctor endpointProctor(toBegin, position);
7488
7490 allocator,
7491 dest.valuePtr(),
7492 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
7493 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
7494 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03));
7495
7496 endpointProctor.release();
7497 guard.release();
7498
7499 *toBegin = fromBegin - 1;
7500}
7501#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 3
7502
7503#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 4
7504template <class VALUE_TYPE, int BLOCK_LENGTH>
7505template <class ALLOCATOR, class Args_01,
7506 class Args_02,
7507 class Args_03,
7508 class Args_04>
7509void
7511 Iterator *toBegin,
7512 Iterator fromBegin,
7513 Iterator position,
7514 ALLOCATOR allocator,
7516 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
7517 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
7518 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
7519 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04)
7520{
7521 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
7522 BLOCK_LENGTH,
7523 ALLOCATOR> ElementGuard;
7524
7525 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
7526 BLOCK_LENGTH> EndpointProctor;
7527
7528 size_type frontSize = position - fromBegin;
7529 Iterator begin = fromBegin;
7530 Iterator dest = begin - 1;
7531
7532 BSLS_ASSERT_SAFE(frontSize >= 1);
7533
7534 ElementGuard guard(dest, dest, allocator);
7535
7536
7538 allocator,
7539 dest.valuePtr(),
7540 MoveUtil::move_if_noexcept(*begin));
7541 guard.moveEnd(1);
7542 ++dest;
7543 ++begin;
7544
7545
7546 size_type n = 0;
7547 for (frontSize -= 1; 0 < frontSize; --frontSize, ++dest, ++begin) {
7548 *dest = MoveUtil::move_if_noexcept(*begin);
7549 ++n;
7550 }
7551 guard.moveEnd(n);
7552
7553
7554 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, dest.valuePtr());
7555
7556
7557
7558 EndpointProctor endpointProctor(toBegin, position);
7559
7561 allocator,
7562 dest.valuePtr(),
7563 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
7564 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
7565 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
7566 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04));
7567
7568 endpointProctor.release();
7569 guard.release();
7570
7571 *toBegin = fromBegin - 1;
7572}
7573#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 4
7574
7575#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 5
7576template <class VALUE_TYPE, int BLOCK_LENGTH>
7577template <class ALLOCATOR, class Args_01,
7578 class Args_02,
7579 class Args_03,
7580 class Args_04,
7581 class Args_05>
7582void
7584 Iterator *toBegin,
7585 Iterator fromBegin,
7586 Iterator position,
7587 ALLOCATOR allocator,
7589 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
7590 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
7591 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
7592 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
7593 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05)
7594{
7595 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
7596 BLOCK_LENGTH,
7597 ALLOCATOR> ElementGuard;
7598
7599 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
7600 BLOCK_LENGTH> EndpointProctor;
7601
7602 size_type frontSize = position - fromBegin;
7603 Iterator begin = fromBegin;
7604 Iterator dest = begin - 1;
7605
7606 BSLS_ASSERT_SAFE(frontSize >= 1);
7607
7608 ElementGuard guard(dest, dest, allocator);
7609
7610
7612 allocator,
7613 dest.valuePtr(),
7614 MoveUtil::move_if_noexcept(*begin));
7615 guard.moveEnd(1);
7616 ++dest;
7617 ++begin;
7618
7619
7620 size_type n = 0;
7621 for (frontSize -= 1; 0 < frontSize; --frontSize, ++dest, ++begin) {
7622 *dest = MoveUtil::move_if_noexcept(*begin);
7623 ++n;
7624 }
7625 guard.moveEnd(n);
7626
7627
7628 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, dest.valuePtr());
7629
7630
7631
7632 EndpointProctor endpointProctor(toBegin, position);
7633
7635 allocator,
7636 dest.valuePtr(),
7637 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
7638 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
7639 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
7640 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
7641 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05));
7642
7643 endpointProctor.release();
7644 guard.release();
7645
7646 *toBegin = fromBegin - 1;
7647}
7648#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 5
7649
7650#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 6
7651template <class VALUE_TYPE, int BLOCK_LENGTH>
7652template <class ALLOCATOR, class Args_01,
7653 class Args_02,
7654 class Args_03,
7655 class Args_04,
7656 class Args_05,
7657 class Args_06>
7658void
7660 Iterator *toBegin,
7661 Iterator fromBegin,
7662 Iterator position,
7663 ALLOCATOR allocator,
7665 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
7666 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
7667 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
7668 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
7669 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
7670 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06)
7671{
7672 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
7673 BLOCK_LENGTH,
7674 ALLOCATOR> ElementGuard;
7675
7676 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
7677 BLOCK_LENGTH> EndpointProctor;
7678
7679 size_type frontSize = position - fromBegin;
7680 Iterator begin = fromBegin;
7681 Iterator dest = begin - 1;
7682
7683 BSLS_ASSERT_SAFE(frontSize >= 1);
7684
7685 ElementGuard guard(dest, dest, allocator);
7686
7687
7689 allocator,
7690 dest.valuePtr(),
7691 MoveUtil::move_if_noexcept(*begin));
7692 guard.moveEnd(1);
7693 ++dest;
7694 ++begin;
7695
7696
7697 size_type n = 0;
7698 for (frontSize -= 1; 0 < frontSize; --frontSize, ++dest, ++begin) {
7699 *dest = MoveUtil::move_if_noexcept(*begin);
7700 ++n;
7701 }
7702 guard.moveEnd(n);
7703
7704
7705 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, dest.valuePtr());
7706
7707
7708
7709 EndpointProctor endpointProctor(toBegin, position);
7710
7712 allocator,
7713 dest.valuePtr(),
7714 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
7715 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
7716 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
7717 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
7718 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
7719 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06));
7720
7721 endpointProctor.release();
7722 guard.release();
7723
7724 *toBegin = fromBegin - 1;
7725}
7726#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 6
7727
7728#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 7
7729template <class VALUE_TYPE, int BLOCK_LENGTH>
7730template <class ALLOCATOR, class Args_01,
7731 class Args_02,
7732 class Args_03,
7733 class Args_04,
7734 class Args_05,
7735 class Args_06,
7736 class Args_07>
7737void
7739 Iterator *toBegin,
7740 Iterator fromBegin,
7741 Iterator position,
7742 ALLOCATOR allocator,
7744 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
7745 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
7746 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
7747 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
7748 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
7749 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
7750 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07)
7751{
7752 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
7753 BLOCK_LENGTH,
7754 ALLOCATOR> ElementGuard;
7755
7756 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
7757 BLOCK_LENGTH> EndpointProctor;
7758
7759 size_type frontSize = position - fromBegin;
7760 Iterator begin = fromBegin;
7761 Iterator dest = begin - 1;
7762
7763 BSLS_ASSERT_SAFE(frontSize >= 1);
7764
7765 ElementGuard guard(dest, dest, allocator);
7766
7767
7769 allocator,
7770 dest.valuePtr(),
7771 MoveUtil::move_if_noexcept(*begin));
7772 guard.moveEnd(1);
7773 ++dest;
7774 ++begin;
7775
7776
7777 size_type n = 0;
7778 for (frontSize -= 1; 0 < frontSize; --frontSize, ++dest, ++begin) {
7779 *dest = MoveUtil::move_if_noexcept(*begin);
7780 ++n;
7781 }
7782 guard.moveEnd(n);
7783
7784
7785 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, dest.valuePtr());
7786
7787
7788
7789 EndpointProctor endpointProctor(toBegin, position);
7790
7792 allocator,
7793 dest.valuePtr(),
7794 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
7795 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
7796 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
7797 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
7798 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
7799 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
7800 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07));
7801
7802 endpointProctor.release();
7803 guard.release();
7804
7805 *toBegin = fromBegin - 1;
7806}
7807#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 7
7808
7809#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 8
7810template <class VALUE_TYPE, int BLOCK_LENGTH>
7811template <class ALLOCATOR, class Args_01,
7812 class Args_02,
7813 class Args_03,
7814 class Args_04,
7815 class Args_05,
7816 class Args_06,
7817 class Args_07,
7818 class Args_08>
7819void
7821 Iterator *toBegin,
7822 Iterator fromBegin,
7823 Iterator position,
7824 ALLOCATOR allocator,
7826 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
7827 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
7828 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
7829 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
7830 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
7831 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
7832 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
7833 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08)
7834{
7835 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
7836 BLOCK_LENGTH,
7837 ALLOCATOR> ElementGuard;
7838
7839 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
7840 BLOCK_LENGTH> EndpointProctor;
7841
7842 size_type frontSize = position - fromBegin;
7843 Iterator begin = fromBegin;
7844 Iterator dest = begin - 1;
7845
7846 BSLS_ASSERT_SAFE(frontSize >= 1);
7847
7848 ElementGuard guard(dest, dest, allocator);
7849
7850
7852 allocator,
7853 dest.valuePtr(),
7854 MoveUtil::move_if_noexcept(*begin));
7855 guard.moveEnd(1);
7856 ++dest;
7857 ++begin;
7858
7859
7860 size_type n = 0;
7861 for (frontSize -= 1; 0 < frontSize; --frontSize, ++dest, ++begin) {
7862 *dest = MoveUtil::move_if_noexcept(*begin);
7863 ++n;
7864 }
7865 guard.moveEnd(n);
7866
7867
7868 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, dest.valuePtr());
7869
7870
7871
7872 EndpointProctor endpointProctor(toBegin, position);
7873
7875 allocator,
7876 dest.valuePtr(),
7877 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
7878 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
7879 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
7880 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
7881 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
7882 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
7883 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
7884 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08));
7885
7886 endpointProctor.release();
7887 guard.release();
7888
7889 *toBegin = fromBegin - 1;
7890}
7891#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 8
7892
7893#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 9
7894template <class VALUE_TYPE, int BLOCK_LENGTH>
7895template <class ALLOCATOR, class Args_01,
7896 class Args_02,
7897 class Args_03,
7898 class Args_04,
7899 class Args_05,
7900 class Args_06,
7901 class Args_07,
7902 class Args_08,
7903 class Args_09>
7904void
7906 Iterator *toBegin,
7907 Iterator fromBegin,
7908 Iterator position,
7909 ALLOCATOR allocator,
7911 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
7912 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
7913 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
7914 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
7915 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
7916 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
7917 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
7918 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
7919 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09)
7920{
7921 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
7922 BLOCK_LENGTH,
7923 ALLOCATOR> ElementGuard;
7924
7925 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
7926 BLOCK_LENGTH> EndpointProctor;
7927
7928 size_type frontSize = position - fromBegin;
7929 Iterator begin = fromBegin;
7930 Iterator dest = begin - 1;
7931
7932 BSLS_ASSERT_SAFE(frontSize >= 1);
7933
7934 ElementGuard guard(dest, dest, allocator);
7935
7936
7938 allocator,
7939 dest.valuePtr(),
7940 MoveUtil::move_if_noexcept(*begin));
7941 guard.moveEnd(1);
7942 ++dest;
7943 ++begin;
7944
7945
7946 size_type n = 0;
7947 for (frontSize -= 1; 0 < frontSize; --frontSize, ++dest, ++begin) {
7948 *dest = MoveUtil::move_if_noexcept(*begin);
7949 ++n;
7950 }
7951 guard.moveEnd(n);
7952
7953
7954 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, dest.valuePtr());
7955
7956
7957
7958 EndpointProctor endpointProctor(toBegin, position);
7959
7961 allocator,
7962 dest.valuePtr(),
7963 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
7964 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
7965 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
7966 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
7967 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
7968 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
7969 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
7970 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
7971 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09));
7972
7973 endpointProctor.release();
7974 guard.release();
7975
7976 *toBegin = fromBegin - 1;
7977}
7978#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 9
7979
7980#if BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 10
7981template <class VALUE_TYPE, int BLOCK_LENGTH>
7982template <class ALLOCATOR, class Args_01,
7983 class Args_02,
7984 class Args_03,
7985 class Args_04,
7986 class Args_05,
7987 class Args_06,
7988 class Args_07,
7989 class Args_08,
7990 class Args_09,
7991 class Args_10>
7992void
7994 Iterator *toBegin,
7995 Iterator fromBegin,
7996 Iterator position,
7997 ALLOCATOR allocator,
7999 BSLS_COMPILERFEATURES_FORWARD_REF(Args_01) arguments_01,
8000 BSLS_COMPILERFEATURES_FORWARD_REF(Args_02) arguments_02,
8001 BSLS_COMPILERFEATURES_FORWARD_REF(Args_03) arguments_03,
8002 BSLS_COMPILERFEATURES_FORWARD_REF(Args_04) arguments_04,
8003 BSLS_COMPILERFEATURES_FORWARD_REF(Args_05) arguments_05,
8004 BSLS_COMPILERFEATURES_FORWARD_REF(Args_06) arguments_06,
8005 BSLS_COMPILERFEATURES_FORWARD_REF(Args_07) arguments_07,
8006 BSLS_COMPILERFEATURES_FORWARD_REF(Args_08) arguments_08,
8007 BSLS_COMPILERFEATURES_FORWARD_REF(Args_09) arguments_09,
8008 BSLS_COMPILERFEATURES_FORWARD_REF(Args_10) arguments_10)
8009{
8010 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
8011 BLOCK_LENGTH,
8012 ALLOCATOR> ElementGuard;
8013
8014 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
8015 BLOCK_LENGTH> EndpointProctor;
8016
8017 size_type frontSize = position - fromBegin;
8018 Iterator begin = fromBegin;
8019 Iterator dest = begin - 1;
8020
8021 BSLS_ASSERT_SAFE(frontSize >= 1);
8022
8023 ElementGuard guard(dest, dest, allocator);
8024
8025
8027 allocator,
8028 dest.valuePtr(),
8029 MoveUtil::move_if_noexcept(*begin));
8030 guard.moveEnd(1);
8031 ++dest;
8032 ++begin;
8033
8034
8035 size_type n = 0;
8036 for (frontSize -= 1; 0 < frontSize; --frontSize, ++dest, ++begin) {
8037 *dest = MoveUtil::move_if_noexcept(*begin);
8038 ++n;
8039 }
8040 guard.moveEnd(n);
8041
8042
8043 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, dest.valuePtr());
8044
8045
8046
8047 EndpointProctor endpointProctor(toBegin, position);
8048
8050 allocator,
8051 dest.valuePtr(),
8052 BSLS_COMPILERFEATURES_FORWARD(Args_01, arguments_01),
8053 BSLS_COMPILERFEATURES_FORWARD(Args_02, arguments_02),
8054 BSLS_COMPILERFEATURES_FORWARD(Args_03, arguments_03),
8055 BSLS_COMPILERFEATURES_FORWARD(Args_04, arguments_04),
8056 BSLS_COMPILERFEATURES_FORWARD(Args_05, arguments_05),
8057 BSLS_COMPILERFEATURES_FORWARD(Args_06, arguments_06),
8058 BSLS_COMPILERFEATURES_FORWARD(Args_07, arguments_07),
8059 BSLS_COMPILERFEATURES_FORWARD(Args_08, arguments_08),
8060 BSLS_COMPILERFEATURES_FORWARD(Args_09, arguments_09),
8061 BSLS_COMPILERFEATURES_FORWARD(Args_10, arguments_10));
8062
8063 endpointProctor.release();
8064 guard.release();
8065
8066 *toBegin = fromBegin - 1;
8067}
8068#endif // BSLALG_DEQUEPRIMITIVES_VARIADIC_LIMIT_B >= 10
8069
8070#else
8071// The generated code below is a workaround for the absence of perfect
8072// forwarding in some compilers.
8073template <class VALUE_TYPE, int BLOCK_LENGTH>
8074template <class ALLOCATOR, class... Args>
8075inline
8076void
8078 Iterator *toEnd,
8079 Iterator fromEnd,
8080 Iterator position,
8081 ALLOCATOR allocator,
8082 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... arguments)
8083{
8084 enum {
8087
8088 VALUE = IS_BITWISECOPYABLE
8089 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
8090 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
8091 };
8092
8093 emplaceAndMoveToBackDispatch(
8094 toEnd,
8095 fromEnd,
8096 position,
8097 allocator,
8099 BSLS_COMPILERFEATURES_FORWARD(Args, arguments)...);
8100}
8101
8102template <class VALUE_TYPE, int BLOCK_LENGTH>
8103template <class ALLOCATOR, class... Args>
8104void
8106 Iterator *toEnd,
8107 Iterator fromEnd,
8108 Iterator position,
8109 ALLOCATOR allocator,
8111 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... arguments)
8112{
8113 const size_type backSize = fromEnd - position;
8114 Iterator end = fromEnd;
8115 Iterator dest = end + 1;
8116
8117
8118 moveBack(&dest, &end, backSize);
8119 --dest;
8120
8122 allocator,
8123 dest.valuePtr(),
8124 BSLS_COMPILERFEATURES_FORWARD(Args, arguments)...);
8125
8126 *toEnd = fromEnd + 1;
8127}
8128
8129template <class VALUE_TYPE, int BLOCK_LENGTH>
8130template <class ALLOCATOR, class... Args>
8131void
8133 Iterator *toEnd,
8134 Iterator fromEnd,
8135 Iterator position,
8136 ALLOCATOR allocator,
8138 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... arguments)
8139{
8140 const size_type backSize = fromEnd - position;
8141 Iterator end = fromEnd;
8142 Iterator dest = end + 1;
8143
8144
8145 MoveGuard guard(end, dest, backSize, false);
8146
8147 moveBack(&dest, &end, backSize);
8148 --dest;
8149
8151 allocator,
8152 dest.valuePtr(),
8153 BSLS_COMPILERFEATURES_FORWARD(Args, arguments)...);
8154
8155 guard.release();
8156
8157 *toEnd = fromEnd + 1;
8158}
8159
8160template <class VALUE_TYPE, int BLOCK_LENGTH>
8161template <class ALLOCATOR, class... Args>
8162void
8164 Iterator *toEnd,
8165 Iterator fromEnd,
8166 Iterator position,
8167 ALLOCATOR allocator,
8169 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... arguments)
8170{
8171 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
8172 BLOCK_LENGTH,
8173 ALLOCATOR> ElementGuard;
8174
8175 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
8176 BLOCK_LENGTH> EndpointProctor;
8177
8178 size_type backSize = fromEnd - position;
8179 Iterator end = fromEnd;
8180 Iterator dest = end + 1;
8181
8182 BSLS_ASSERT_SAFE(backSize >= 1);
8183
8184 ElementGuard guard(dest, dest, allocator);
8185
8186
8187 --dest;
8188 --end;
8190 allocator,
8191 dest.valuePtr(),
8192 MoveUtil::move_if_noexcept(*end));
8193 guard.moveBegin(-1);
8194
8195
8196 size_type n = 0;
8197 for (backSize -= 1; 0 < backSize; --backSize) {
8198 --dest;
8199 --end;
8200 *dest = MoveUtil::move_if_noexcept(*end);
8201 ++n;
8202 }
8203 guard.moveBegin(-n);
8204
8205
8206 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, position.valuePtr());
8207
8208
8209
8210 EndpointProctor endpointProctor(toEnd, position);
8211
8213 allocator,
8214 position.valuePtr(),
8215 BSLS_COMPILERFEATURES_FORWARD(Args, arguments)...);
8216
8217 endpointProctor.release();
8218 guard.release();
8219
8220 *toEnd = fromEnd + 1;
8221}
8222
8223template <class VALUE_TYPE, int BLOCK_LENGTH>
8224template <class ALLOCATOR, class... Args>
8225inline
8226void
8228 Iterator *toBegin,
8229 Iterator fromBegin,
8230 Iterator position,
8231 ALLOCATOR allocator,
8232 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... arguments)
8233{
8234 enum {
8237
8238 VALUE = IS_BITWISECOPYABLE
8239 ? BITWISE_COPYABLE_TRAITS : IS_BITWISEMOVEABLE
8240 ? BITWISE_MOVEABLE_TRAITS : NIL_TRAITS
8241 };
8242
8243 emplaceAndMoveToFrontDispatch(
8244 toBegin,
8245 fromBegin,
8246 position,
8247 allocator,
8249 BSLS_COMPILERFEATURES_FORWARD(Args, arguments)...);
8250}
8251
8252template <class VALUE_TYPE, int BLOCK_LENGTH>
8253template <class ALLOCATOR, class... Args>
8254void
8256 Iterator *toBegin,
8257 Iterator fromBegin,
8258 Iterator position,
8259 ALLOCATOR allocator,
8261 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... arguments)
8262{
8263 const size_type frontSize = position - fromBegin;
8264 Iterator begin = fromBegin;
8265 Iterator dest = begin - 1;
8266
8267
8268 moveFront(&dest, &begin, frontSize);
8269
8271 allocator,
8272 dest.valuePtr(),
8273 BSLS_COMPILERFEATURES_FORWARD(Args, arguments)...);
8274
8275 *toBegin = fromBegin - 1;
8276}
8277
8278template <class VALUE_TYPE, int BLOCK_LENGTH>
8279template <class ALLOCATOR, class... Args>
8280void
8282 Iterator *toBegin,
8283 Iterator fromBegin,
8284 Iterator position,
8285 ALLOCATOR allocator,
8287 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... arguments)
8288{
8289 const size_type frontSize = position - fromBegin;
8290 Iterator begin = fromBegin;
8291 Iterator dest = begin - 1;
8292
8293
8294 MoveGuard guard(begin, dest, frontSize, true);
8295
8296 moveFront(&dest, &begin, frontSize);
8297
8299 allocator,
8300 dest.valuePtr(),
8301 BSLS_COMPILERFEATURES_FORWARD(Args, arguments)...);
8302
8303 guard.release();
8304
8305 *toBegin = fromBegin - 1;
8306}
8307
8308template <class VALUE_TYPE, int BLOCK_LENGTH>
8309template <class ALLOCATOR, class... Args>
8310void
8312 Iterator *toBegin,
8313 Iterator fromBegin,
8314 Iterator position,
8315 ALLOCATOR allocator,
8317 BSLS_COMPILERFEATURES_FORWARD_REF(Args)... arguments)
8318{
8319 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
8320 BLOCK_LENGTH,
8321 ALLOCATOR> ElementGuard;
8322
8323 typedef DequePrimitives_DequeEndpointProctor<VALUE_TYPE,
8324 BLOCK_LENGTH> EndpointProctor;
8325
8326 size_type frontSize = position - fromBegin;
8327 Iterator begin = fromBegin;
8328 Iterator dest = begin - 1;
8329
8330 BSLS_ASSERT_SAFE(frontSize >= 1);
8331
8332 ElementGuard guard(dest, dest, allocator);
8333
8334
8336 allocator,
8337 dest.valuePtr(),
8338 MoveUtil::move_if_noexcept(*begin));
8339 guard.moveEnd(1);
8340 ++dest;
8341 ++begin;
8342
8343
8344 size_type n = 0;
8345 for (frontSize -= 1; 0 < frontSize; --frontSize, ++dest, ++begin) {
8346 *dest = MoveUtil::move_if_noexcept(*begin);
8347 ++n;
8348 }
8349 guard.moveEnd(n);
8350
8351
8352 bsl::allocator_traits<ALLOCATOR>::destroy(allocator, dest.valuePtr());
8353
8354
8355
8356 EndpointProctor endpointProctor(toBegin, position);
8357
8359 allocator,
8360 dest.valuePtr(),
8361 BSLS_COMPILERFEATURES_FORWARD(Args, arguments)...);
8362
8363 endpointProctor.release();
8364 guard.release();
8365
8366 *toBegin = fromBegin - 1;
8367}
8368// }}} END GENERATED CODE
8369#endif
8370
8371template <class VALUE_TYPE, int BLOCK_LENGTH>
8372void DequePrimitives<VALUE_TYPE, BLOCK_LENGTH>
8373 ::moveBack(Iterator *destination,
8374 Iterator *source,
8375 size_type numElements)
8376{
8377 if (destination->offsetInBlock() > numElements
8378 && source->offsetInBlock() > numElements) {
8379 // There is enough room to move everything at once.
8380
8381 *destination -= numElements;
8382 *source -= numElements;
8383 std::memmove((void *)destination->valuePtr(),
8384 source->valuePtr(),
8385 numElements * sizeof(VALUE_TYPE));
8386
8387 return; // RETURN
8388 }
8389
8390 // Moving the blocks involving segments of 3 different lengths, as
8391 // illustrated below. We need to distinguish whether destination or the
8392 // source have more space remaining, and adjust the algorithm accordingly.
8393 //..
8394 // [--- n ---] - segment 'n'
8395 // [--- n'---] - segment with equal length as 'n'.
8396 // [--- n ---I-- m --] - two segments, with length 'n' and 'm'.
8397 // - - - - - - - -
8398 // | | | | | | | | | - a block in the deque pointed by a 'blockPtr'
8399 // - - - - - - - -
8400 //..
8401 //
8402 // Scenario 1: Source has less element than destination has space
8403 // ==============================================================
8404 // Under this scenario, we have to move all elements from the source block
8405 // to the destination block first (segment 1), then fill the destination
8406 // block with the remaining elements (segment 2). After, we alternate
8407 // between segments 3 and 2.
8408 //..
8409 // [--- 3 ---I- 2'-] [- 1 -] [- 2 -I- 1'-]
8410 // - - - - - - - - - - - - - - - - - - - - - - - -
8411 // |d|e|f|g|h|i|j|k| |a|b|c|/| | | | | | | | | | | | | |
8412 // - - - - - - - - - - - - - - - - - - - - - - - -
8413 // ^ ^
8414 // source ____| destination _____|
8415 //..
8416 //
8417 // Scenario 2: Source has more elements than destination has space
8418 // ================================================================
8419 // Under this scenario, we can only move some elements (the number of
8420 // elements that can fit in the destination block) from the source block to
8421 // the destination block first (segment 1), then move the remaining
8422 // elements (segment 2) from the source block. After, we alternate between
8423 // segments 3 and 2.
8424 //..
8425 // [---- 3 ----]
8426 // [---- 3' ---] [-2-I- 1 -] [2' ] [- 1 -]
8427 // - - - - - - - - - - - - - - - - - - - - - - - -
8428 // |d|e|f|g|h|i|j|k| |a|b|c|d|e|/| | | | | | | | | | | |
8429 // - - - - - - - - - - - - - - - - - - - - - - - -
8430 // ^ ^
8431 // source _____| destination _|
8432 //
8433 // 1) Copy segment 1
8434 // 2) Copy segment 2
8435 // 3) Copy segment 3
8436 // 4) Repeat 2, 3 until there's less than 1 'BLOCK_LENGTH' left
8437 // 5) Copy the remaining items over
8438 //..
8439
8440 size_type firstSegment, secondSegment;
8441 if (source->offsetInBlock() > destination->offsetInBlock()) {
8442 firstSegment = destination->offsetInBlock();
8443 secondSegment = source->offsetInBlock() - firstSegment;
8444 }
8445 else {
8446 firstSegment = source->offsetInBlock();
8447 secondSegment = destination->offsetInBlock() - firstSegment;
8448 }
8449
8450 size_type thirdSegment = BLOCK_LENGTH - secondSegment;
8451
8452 *destination -= firstSegment;
8453 *source -= firstSegment;
8454 numElements -= firstSegment;
8455
8456 std::memmove((void *)destination->valuePtr(),
8457 source->valuePtr(),
8458 firstSegment * sizeof(VALUE_TYPE));
8459
8460 for (; numElements >= BLOCK_LENGTH; numElements -= BLOCK_LENGTH) {
8461
8462 *destination -= secondSegment;
8463 *source -= secondSegment;
8464
8465 std::memmove((void *)destination->valuePtr(),
8466 source->valuePtr(),
8467 secondSegment * sizeof(VALUE_TYPE));
8468
8469 *destination -= thirdSegment;
8470 *source -= thirdSegment;
8471
8472 std::memmove((void *)destination->valuePtr(),
8473 source->valuePtr(),
8474 thirdSegment * sizeof(VALUE_TYPE));
8475 }
8476
8477 size_type remaining = numElements > secondSegment
8478 ? secondSegment
8479 : numElements;
8480
8481 *destination -= remaining;
8482 *source -= remaining;
8483 numElements -= remaining;
8484
8485 std::memmove((void *)destination->valuePtr(),
8486 source->valuePtr(),
8487 remaining * sizeof(VALUE_TYPE));
8488
8489 *destination -= numElements;
8490 *source -= numElements;
8491
8492 std::memmove((void *)destination->valuePtr(),
8493 source->valuePtr(),
8494 numElements * sizeof(VALUE_TYPE));
8495}
8496
8497template <class VALUE_TYPE, int BLOCK_LENGTH>
8498void DequePrimitives<VALUE_TYPE, BLOCK_LENGTH>
8499 ::moveFront(Iterator *destination,
8500 Iterator *source,
8501 size_type numElements)
8502{
8503 if (destination->remainingInBlock() > numElements
8504 && source->remainingInBlock() > numElements) {
8505 // There is enough room to move everything at once
8506
8507 std::memmove((void *)destination->valuePtr(),
8508 source->valuePtr(),
8509 numElements * sizeof(VALUE_TYPE));
8510 *destination += numElements;
8511 *source += numElements;
8512
8513 return; // RETURN
8514 }
8515
8516 // Moving the blocks involving segments of 3 different lengths, as
8517 // illustrated below. We need to distinguish whether destination or the
8518 // source have more space remaining, and adjust the algorithm accordingly.
8519 //..
8520 // [--- n ---] - segment 'n'
8521 // [--- n'---] - segment with equal length as 'n'
8522 // [--- n ---I-- m --] - two segments, with length 'n' and 'm'.
8523 // - - - - - - - -
8524 // | | | | | | | | | - a block in the deque pointed by a 'blockPtr'
8525 // - - - - - - - -
8526 //..
8527 //
8528 // Scenario 1: Source has more elements than destination has space
8529 // ===============================================================
8530 // Under this scenario, we can only move some elements (the number of
8531 // elements that can fit in the destination block) from the source block to
8532 // the destination block first (segment 1), then move the remaining
8533 // elements (segment 2) from the source block. After, we alternate between
8534 // segments 3 and 2.
8535 //..
8536 // [---- 3 ----]
8537 // [- 1 -] [ 2'] [- 1'-I-2-] [---- 3'----]
8538 // - - - - - - - - - - - - - - - - - - - - - - - -
8539 // | | | | | | | | | | | | |a|a|b|c|d| |e|f|g|h|i|j|k|l|
8540 // - - - - - - - - - - - - - - - - - - - - - - - -
8541 // ^ ^
8542 // |_ destination |____ source
8543 //..
8544 //
8545 // Scenario 2: Source has less elements than destination has space
8546 // ===============================================================
8547 // Under this scenario, we have to move all elements from the source block
8548 // to the destination block first (segment 1), then fill the destination
8549 // block with the remaining elements (segment 2). After, we alternate
8550 // between segments 3 and 2.
8551 //..
8552 // [- 1'-I- 2 -] [--- 3'---I- 1 -] [- 2'-I--- 3 ---]
8553 // - - - - - - - - - - - - - - - - - - - - - - - -
8554 // | | | | | | | | | | | | | | |a|b|c| |d|e|f|g|h|i|j|k|
8555 // - - - - - - - - - - - - - - - - - - - - - - - -
8556 // ^ ^
8557 // |_ destination |____ source
8558 //
8559 // 1) Copy segment 1
8560 // 2) Copy segment 2
8561 // 3) Copy segment 3
8562 // 4) Repeat 2, 3 until there's less than 1 'BLOCK_LENGTH' left
8563 // 5) Copy the remaining items over
8564 //..
8565
8566 size_type firstSegment, secondSegment;
8567 if (source->remainingInBlock() > destination->remainingInBlock()) {
8568 firstSegment = destination->remainingInBlock();
8569 secondSegment = source->remainingInBlock() - firstSegment;
8570 }
8571 else {
8572 firstSegment = source->remainingInBlock();
8573 secondSegment = destination->remainingInBlock() - firstSegment;
8574 }
8575
8576 size_type thirdSegment = BLOCK_LENGTH - secondSegment;
8577
8578 std::memmove((void *)destination->valuePtr(),
8579 source->valuePtr(),
8580 firstSegment * sizeof(VALUE_TYPE));
8581
8582 *destination += firstSegment;
8583 *source += firstSegment;
8584 numElements -= firstSegment;
8585
8586 for (; numElements >= BLOCK_LENGTH; numElements -= BLOCK_LENGTH) {
8587
8588 std::memmove((void *)destination->valuePtr(),
8589 source->valuePtr(),
8590 secondSegment * sizeof(VALUE_TYPE));
8591
8592 *destination += secondSegment;
8593 *source += secondSegment;
8594
8595 std::memmove((void *)destination->valuePtr(),
8596 source->valuePtr(),
8597 thirdSegment * sizeof(VALUE_TYPE));
8598
8599 *destination += thirdSegment;
8600 *source += thirdSegment;
8601 }
8602
8603 size_type remaining = numElements > secondSegment
8604 ? secondSegment
8605 : numElements;
8606
8607 std::memmove((void *)destination->valuePtr(),
8608 source->valuePtr(),
8609 remaining * sizeof(VALUE_TYPE));
8610
8611 *destination += remaining;
8612 *source += remaining;
8613 numElements -= remaining;
8614
8615 std::memmove((void *)destination->valuePtr(),
8616 source->valuePtr(),
8617 numElements * sizeof(VALUE_TYPE));
8618
8619 *destination += numElements;
8620 *source += numElements;
8621}
8622
8623template <class VALUE_TYPE, int BLOCK_LENGTH>
8624template <class ALLOCATOR>
8625void
8626DequePrimitives<VALUE_TYPE, BLOCK_LENGTH>
8627 ::uninitializedFillNBack(Iterator *toEnd,
8628 Iterator fromEnd,
8629 size_type numElements,
8630 const VALUE_TYPE& value,
8631 ALLOCATOR allocator)
8632{
8633 if (fromEnd.remainingInBlock() > numElements) {
8634 ArrayPrimitives::uninitializedFillN(fromEnd.valuePtr(),
8635 numElements,
8636 value,
8637 allocator);
8638 fromEnd += numElements;
8639 *toEnd = fromEnd;
8640 return; // RETURN
8641 }
8642
8643 size_type firstRemaining = fromEnd.remainingInBlock();
8644
8645 ArrayPrimitives::uninitializedFillN(fromEnd.valuePtr(),
8646 firstRemaining,
8647 value,
8648 allocator);
8649
8650 numElements -= firstRemaining;
8651 fromEnd += firstRemaining;
8652 *toEnd = fromEnd;
8653
8654 for ( ; numElements >= BLOCK_LENGTH; numElements -= BLOCK_LENGTH) {
8655 ArrayPrimitives::uninitializedFillN(fromEnd.valuePtr(),
8656 BLOCK_LENGTH,
8657 value,
8658 allocator);
8659 fromEnd.nextBlock();
8660 toEnd->nextBlock();
8661 }
8662
8663 ArrayPrimitives::uninitializedFillN(fromEnd.valuePtr(),
8664 numElements,
8665 value,
8666 allocator);
8667
8668 fromEnd += numElements;
8669 *toEnd = fromEnd;
8670}
8671
8672template <class VALUE_TYPE, int BLOCK_LENGTH>
8673template <class ALLOCATOR>
8674void
8675DequePrimitives<VALUE_TYPE, BLOCK_LENGTH>
8676 ::valueInititalizeN(Iterator *toEnd,
8677 Iterator fromEnd,
8678 size_type numElements,
8679 ALLOCATOR allocator)
8680{
8681 if (fromEnd.remainingInBlock() > numElements) {
8682 ArrayPrimitives::defaultConstruct(fromEnd.valuePtr(),
8683 numElements,
8684 allocator);
8685 fromEnd += numElements;
8686 *toEnd = fromEnd;
8687 return; // RETURN
8688 }
8689
8690 size_type firstRemaining = fromEnd.remainingInBlock();
8691
8692 ArrayPrimitives::defaultConstruct(fromEnd.valuePtr(),
8693 firstRemaining,
8694 allocator);
8695
8696 numElements -= firstRemaining;
8697 fromEnd += firstRemaining;
8698 *toEnd = fromEnd;
8699
8700 for ( ; numElements >= BLOCK_LENGTH; numElements -= BLOCK_LENGTH) {
8701 ArrayPrimitives::defaultConstruct(fromEnd.valuePtr(),
8702 BLOCK_LENGTH,
8703 allocator);
8704 fromEnd.nextBlock();
8705 toEnd->nextBlock();
8706 }
8707
8708 ArrayPrimitives::defaultConstruct(fromEnd.valuePtr(),
8709 numElements,
8710 allocator);
8711
8712 fromEnd += numElements;
8713 *toEnd = fromEnd;
8714}
8715
8716template <class VALUE_TYPE, int BLOCK_LENGTH>
8717template <class ALLOCATOR>
8718void
8719DequePrimitives<VALUE_TYPE, BLOCK_LENGTH>
8720 ::uninitializedFillNFront(Iterator *toBegin,
8721 Iterator fromBegin,
8722 size_type numElements,
8723 const VALUE_TYPE& value,
8724 ALLOCATOR allocator)
8725{
8726 if (fromBegin.offsetInBlock() > numElements) {
8727 fromBegin -= numElements;
8728
8729 ArrayPrimitives::uninitializedFillN(fromBegin.valuePtr(),
8730 numElements,
8731 value,
8732 allocator);
8733 *toBegin = fromBegin;
8734 return; // RETURN
8735 }
8736
8737 size_type firstRemaining = fromBegin.offsetInBlock();
8738
8739 fromBegin -= firstRemaining;
8740 numElements -= firstRemaining;
8741
8742 ArrayPrimitives::uninitializedFillN(fromBegin.valuePtr(),
8743 firstRemaining,
8744 value,
8745 allocator);
8746
8747 *toBegin = fromBegin; // in case of exception
8748
8749 for ( ; numElements >= BLOCK_LENGTH; numElements -= BLOCK_LENGTH) {
8750 fromBegin.previousBlock();
8751 ArrayPrimitives::uninitializedFillN(fromBegin.valuePtr(),
8752 BLOCK_LENGTH,
8753 value,
8754 allocator);
8755 *toBegin = fromBegin;
8756 }
8757
8758 fromBegin -= numElements;
8759 ArrayPrimitives::uninitializedFillN(fromBegin.valuePtr(),
8760 numElements,
8761 value,
8762 allocator);
8763
8764 *toBegin = fromBegin;
8765}
8766
8767 // ------------------------------------
8768 // class DequePrimitives<VALUE_TYPE, 1>
8769 // ------------------------------------
8770
8771// CLASS METHODS
8772template <class VALUE_TYPE>
8773template <class ALLOCATOR>
8776 Iterator *toEnd,
8777 Iterator fromBegin,
8778 Iterator first,
8779 Iterator last,
8780 Iterator fromEnd,
8781 ALLOCATOR allocator)
8782{
8783 size_type frontSize = first - fromBegin;
8784 size_type backSize = fromEnd - last;
8785 Iterator ret;
8786
8787 if (frontSize < backSize) {
8788 ret = last;
8789 for (; 0 < frontSize; --frontSize) {
8790 --last;
8791 --first;
8792 *last = *first;
8793 }
8794 *toBegin = last;
8795 *toEnd = fromEnd;
8796 }
8797 else {
8798 ret = first;
8799 for (; 0 < backSize; --backSize, ++first, ++last) {
8800 *first = *last;
8801 }
8802 *toBegin = fromBegin;
8803 *toEnd = first;
8804 }
8805 destruct(first, last, allocator);
8806 return ret;
8807}
8808
8809template <class VALUE_TYPE>
8810template <class ALLOCATOR>
8812 Iterator end,
8813 ALLOCATOR allocator)
8814{
8815 for (; !(begin == end); ++begin) {
8817 begin.valuePtr());
8818 }
8819}
8820
8821template <class VALUE_TYPE>
8822template <class ALLOCATOR>
8823void
8824DequePrimitives<VALUE_TYPE, 1>
8825 ::insertAndMoveToFront(Iterator *toBegin,
8826 Iterator fromBegin,
8827 Iterator position,
8828 size_type numElements,
8829 const VALUE_TYPE& value,
8830 ALLOCATOR allocator)
8831{
8832 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
8833 1,
8834 ALLOCATOR> ElementGuard;
8835
8836 size_type frontSize = position - fromBegin;
8837 Iterator begin = fromBegin;
8838 Iterator dest = begin - numElements;
8839 size_type numDest;
8840
8844 value);
8846 temp(BSLS_UTIL_ADDRESSOF(space.object()));
8847
8848 // TBD: this does the same thing as the old code - don't like that we
8849 // circumvent the whole allocator thing, but for now, let's keep it
8850 // consistent.
8851 // ConstructorProxy<VALUE_TYPE>
8852 // tempValue(value, bslma::Default::allocator());
8853
8854 ElementGuard guard(dest, dest, allocator);
8855 if (frontSize >= numElements) {
8856 for (numDest = numElements; 0 < numDest; --numDest, ++dest, ++begin) {
8858 dest.valuePtr(),
8859 *begin);
8860 guard.moveEnd(1);
8861 }
8862 for (frontSize -= numElements; 0 < frontSize;
8863 --frontSize, ++dest, ++begin) {
8864 *dest = *begin;
8865 }
8866 for (numDest = numElements; 0 < numDest; --numDest, ++dest) {
8867 *dest = space.object();
8868 }
8869 } else {
8870 for (numDest = frontSize; 0 < numDest; --numDest, ++dest, ++begin) {
8872 dest.valuePtr(),
8873 *begin);
8874 guard.moveEnd(1);
8875 }
8876 for (numDest = numElements; frontSize < numDest; --numDest, ++dest) {
8878 dest.valuePtr(),
8879 space.object());
8880 guard.moveEnd(1);
8881 }
8882 for (; 0 < numDest; --numDest, ++dest) {
8883 *dest = space.object();
8884 }
8885 }
8886 guard.release();
8887 *toBegin = fromBegin - numElements;
8888}
8889
8890template <class VALUE_TYPE>
8891template <class FWD_ITER, class ALLOCATOR>
8892void
8893DequePrimitives<VALUE_TYPE, 1>
8894 ::insertAndMoveToFront(Iterator *toBegin,
8895 Iterator fromBegin,
8896 Iterator position,
8897 FWD_ITER first,
8898 FWD_ITER /*last*/,
8899 size_type numElements,
8900 ALLOCATOR allocator)
8901{
8902 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
8903 1,
8904 ALLOCATOR> ElementGuard;
8905
8906 size_type frontSize = position - fromBegin;
8907 Iterator begin = fromBegin;
8908 Iterator dest = begin - numElements;
8909 size_type numDest;
8910
8911 ElementGuard guard(dest, dest, allocator);
8912 if (frontSize >= numElements) {
8913 for (numDest = numElements; 0 < numDest; --numDest, ++dest, ++begin) {
8915 dest.valuePtr(),
8916 *begin);
8917 guard.moveEnd(1);
8918 }
8919 for (frontSize -= numElements; 0 < frontSize;
8920 --frontSize, ++dest, ++begin) {
8921 *dest = *begin;
8922 }
8923 for (numDest = numElements; 0 < numDest; --numDest, ++dest, ++first) {
8924 *dest = *first;
8925 }
8926 } else {
8927 for (numDest = frontSize; 0 < numDest; --numDest, ++dest, ++begin) {
8929 dest.valuePtr(),
8930 *begin);
8931 guard.moveEnd(1);
8932 }
8933 for (numDest = numElements; frontSize < numDest;
8934 --numDest, ++dest, ++first) {
8936 dest.valuePtr(),
8937 *first);
8938 guard.moveEnd(1);
8939 }
8940 for (; 0 < numDest; --numDest, ++dest, ++first) {
8941 *dest = *first;
8942 }
8943 }
8944 guard.release();
8945 *toBegin = fromBegin - numElements;
8946}
8947
8948template <class VALUE_TYPE>
8949template <class ALLOCATOR>
8950void
8952 Iterator *toEnd,
8953 Iterator fromEnd,
8954 Iterator position,
8955 size_type numElements,
8956 const VALUE_TYPE& value,
8957 ALLOCATOR allocator)
8958{
8959 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
8960 1,
8961 ALLOCATOR> ElementGuard;
8962
8963 size_type backSize = fromEnd - position;
8964 Iterator end = fromEnd;
8965 Iterator dest = end + numElements;
8966 size_type numDest;
8967
8971 value);
8973 temp(BSLS_UTIL_ADDRESSOF(space.object()));
8974
8975 // TBD: this does the same thing as the old code - don't like that we
8976 // circumvent the whole allocator thing, but for now, let's keep it
8977 // consistent.
8978 // ConstructorProxy<VALUE_TYPE>
8979 // tempValue(value, bslma::Default::allocator());
8980
8981 ElementGuard guard(dest, dest, allocator);
8982 if (backSize >= numElements) {
8983 for (numDest = numElements; 0 < numDest; --numDest) {
8984 --dest;
8985 --end;
8987 dest.valuePtr(),
8988 *end);
8989 guard.moveBegin(-1);
8990 }
8991 for (backSize -= numElements; 0 < backSize; --backSize) {
8992 --dest;
8993 --end;
8994 *dest = *end;
8995 }
8996 for (numDest = numElements; 0 < numDest; --numDest, ++position) {
8997 *position = space.object();
8998 }
8999 } else {
9000 for (numDest = backSize; 0 < numDest; --numDest) {
9001 --dest;
9002 --end;
9004 dest.valuePtr(),
9005 *end);
9006 guard.moveBegin(-1);
9007 }
9008 for (numDest = numElements; backSize < numDest; --numDest) {
9009 --dest;
9011 dest.valuePtr(),
9012 space.object());
9013 guard.moveBegin(-1);
9014 }
9015 for (; 0 < numDest; --numDest, ++position) {
9016 *position = space.object();
9017 }
9018 }
9019 guard.release();
9020 *toEnd = fromEnd + numElements;
9021}
9022
9023template <class VALUE_TYPE>
9024template <class FWD_ITER, class ALLOCATOR>
9025void
9027 Iterator fromEnd,
9028 Iterator position,
9029 FWD_ITER first,
9030 FWD_ITER /*last*/,
9031 size_type numElements,
9032 ALLOCATOR allocator)
9033{
9034 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
9035 1,
9036 ALLOCATOR> ElementGuard;
9037
9038 size_type backSize = fromEnd - position;
9039 Iterator end = fromEnd;
9040 Iterator dest = end + numElements;
9041 size_type numDest;
9042
9043 ElementGuard guard(dest, dest, allocator);
9044 if (backSize >= numElements) {
9045 for (numDest = numElements; 0 < numDest; --numDest) {
9046 --dest;
9047 --end;
9049 dest.valuePtr(),
9050 *end);
9051 guard.moveBegin(-1);
9052 }
9053 for (numDest = backSize; numElements < numDest; --numDest) {
9054 --dest;
9055 --end;
9056 *dest = *end;
9057 }
9058 for (; 0 < numDest; ++first, ++position, --numDest) {
9059 *position = *first;
9060 }
9061 } else {
9062 for (numDest = backSize; 0 < numDest; --numDest) {
9063 --dest;
9064 --end;
9066 dest.valuePtr(),
9067 *end);
9068 guard.moveBegin(-1);
9069 }
9070 for (numDest = backSize; 0 < numDest; --numDest, ++position, ++first) {
9071 *position = *first;
9072 }
9073 ElementGuard guard2(position, position, allocator);
9074 for (numDest = numElements; backSize < numDest; ++first, ++position,
9075 --numDest) {
9077 position.valuePtr(),
9078 *first);
9079 guard2.moveEnd(1);
9080 }
9081 guard2.release();
9082 }
9083 guard.release();
9084 *toEnd = fromEnd + numElements;
9085}
9086
9087template <class VALUE_TYPE>
9088template <class ALLOCATOR>
9089inline
9090void
9092 Iterator *toBegin,
9093 Iterator fromBegin,
9094 size_type numElements,
9095 const VALUE_TYPE& value,
9096 ALLOCATOR allocator)
9097{
9098 enum {
9099 IS_FUNCTION_POINTER = bslmf::IsFunctionPointer<VALUE_TYPE>::value,
9102
9103 IS_FUNDAMENTAL_OR_POINTER = IS_FUNDAMENTAL ||
9104 (IS_POINTER && !IS_FUNCTION_POINTER),
9105
9107
9108 VALUE = IS_FUNDAMENTAL_OR_POINTER || IS_BITWISECOPYABLE ?
9109 NON_NIL_TRAITS
9110 : NIL_TRAITS
9111 };
9112
9113 uninitializedFillNFront(toBegin,
9114 fromBegin,
9115 numElements,
9116 value,
9117 allocator,
9119}
9120
9121template <class VALUE_TYPE>
9122template <class ALLOCATOR>
9123void
9125 Iterator *toBegin,
9126 Iterator fromBegin,
9127 size_type numElements,
9128 const VALUE_TYPE& value,
9129 ALLOCATOR allocator,
9131{
9132 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
9133 1,
9134 ALLOCATOR> ElementGuard;
9135
9136 ElementGuard guard(fromBegin, fromBegin, allocator);
9137 for (; 0 < numElements; --numElements) {
9138 --fromBegin;
9140 fromBegin.valuePtr(),
9141 value);
9142 guard.moveBegin(-1);
9143 }
9144 guard.release();
9145 *toBegin = fromBegin;
9146}
9147
9148template <class VALUE_TYPE>
9149template <class ALLOCATOR>
9150void
9152 Iterator *toBegin,
9153 Iterator fromBegin,
9154 size_type numElements,
9155 const VALUE_TYPE& value,
9156 ALLOCATOR allocator,
9158{
9159 *toBegin = fromBegin; // necessary in case 'numElements = 0'
9160 for ( ; 0 < numElements; --numElements) {
9161 --fromBegin;
9162 ArrayPrimitives::uninitializedFillN(fromBegin.valuePtr(),
9163 1,
9164 value,
9165 allocator);
9166 *toBegin = fromBegin; // in case of exception
9167 }
9168}
9169
9170template <class VALUE_TYPE>
9171template <class ALLOCATOR>
9172inline
9173void
9175 Iterator *toEnd,
9176 Iterator fromEnd,
9177 size_type numElements,
9178 const VALUE_TYPE& value,
9179 ALLOCATOR allocator)
9180{
9181 enum {
9182 IS_FUNCTION_POINTER = bslmf::IsFunctionPointer<VALUE_TYPE>::value,
9185
9186 IS_FUNDAMENTAL_OR_POINTER = IS_FUNDAMENTAL ||
9187 (IS_POINTER && !IS_FUNCTION_POINTER),
9188
9190
9191 VALUE = IS_FUNDAMENTAL_OR_POINTER || IS_BITWISECOPYABLE ?
9192 NON_NIL_TRAITS
9193 : NIL_TRAITS
9194 };
9195
9196 uninitializedFillNBack(toEnd,
9197 fromEnd,
9198 numElements,
9199 value,
9200 allocator,
9202}
9203
9204template <class VALUE_TYPE>
9205template <class ALLOCATOR>
9206void
9208 Iterator *toEnd,
9209 Iterator fromEnd,
9210 size_type numElements,
9211 const VALUE_TYPE& value,
9212 ALLOCATOR allocator,
9214{
9215 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
9216 1,
9217 ALLOCATOR> ElementGuard;
9218
9219 ElementGuard guard(fromEnd, fromEnd, allocator);
9220 for (; 0 < numElements; --numElements) {
9222 fromEnd.valuePtr(),
9223 value);
9224 ++fromEnd;
9225 guard.moveEnd(1);
9226 }
9227 guard.release();
9228 *toEnd = fromEnd;
9229}
9230
9231template <class VALUE_TYPE>
9232template <class ALLOCATOR>
9233void
9235 Iterator *toEnd,
9236 Iterator fromEnd,
9237 size_type numElements,
9238 const VALUE_TYPE& value,
9239 ALLOCATOR allocator,
9241{
9242 *toEnd = fromEnd; // necessary in case 'numElements = 0'
9243 for ( ; 0 < numElements; --numElements) {
9244 ArrayPrimitives::uninitializedFillN(fromEnd.valuePtr(),
9245 1,
9246 value,
9247 allocator);
9248 ++fromEnd;
9249 *toEnd = fromEnd;
9250 }
9251}
9252
9253template <class VALUE_TYPE>
9254template <class ALLOCATOR>
9255inline
9256void
9258 Iterator fromEnd,
9259 size_type numElements,
9260 ALLOCATOR allocator)
9261{
9262 enum {
9263 IS_FUNCTION_POINTER = bslmf::IsFunctionPointer<VALUE_TYPE>::value,
9266
9267 IS_FUNDAMENTAL_OR_POINTER = IS_FUNDAMENTAL ||
9268 (IS_POINTER && !IS_FUNCTION_POINTER),
9269
9271
9272 VALUE = IS_FUNDAMENTAL_OR_POINTER || IS_BITWISECOPYABLE ?
9273 NON_NIL_TRAITS
9274 : NIL_TRAITS
9275 };
9276
9277 valueInititalizeN(toEnd,
9278 fromEnd,
9279 numElements,
9280 allocator,
9282}
9283
9284template <class VALUE_TYPE>
9285template <class ALLOCATOR>
9286void
9288 Iterator *toEnd,
9289 Iterator fromEnd,
9290 size_type numElements,
9291 ALLOCATOR allocator,
9293{
9294 typedef DequePrimitives_DequeElementGuard<VALUE_TYPE,
9295 1,
9296 ALLOCATOR> ElementGuard;
9297
9298 ElementGuard guard(fromEnd, fromEnd, allocator);
9299 for (; 0 < numElements; --numElements) {
9301 fromEnd.valuePtr());
9302 ++fromEnd;
9303 guard.moveEnd(1);
9304 }
9305 guard.release();
9306 *toEnd = fromEnd;
9307}
9308
9309template <class VALUE_TYPE>
9310template <class ALLOCATOR>
9311void
9313 Iterator *toEnd,
9314 Iterator fromEnd,
9315 size_type numElements,
9316 ALLOCATOR allocator,
9318{
9319 *toEnd = fromEnd; // necessary in case 'numElements = 0'
9320 for ( ; 0 < numElements; --numElements) {
9321 ArrayPrimitives::defaultConstruct(fromEnd.valuePtr(),
9322 1,
9323 allocator);
9324 ++fromEnd;
9325 *toEnd = fromEnd;
9326 }
9327}
9328
9329 // ---------------------------------------
9330 // class DequePrimitives_DequeElementGuard
9331 // ---------------------------------------
9332
9333// CREATORS
9334template <class VALUE_TYPE, int BLOCK_LENGTH, class ALLOCATOR>
9335inline
9336DequePrimitives_DequeElementGuard<VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR>
9337 ::DequePrimitives_DequeElementGuard(const Iterator& begin,
9338 const Iterator& end,
9339 ALLOCATOR allocator)
9340: d_begin(begin)
9341, d_end(end)
9342, d_allocator(allocator)
9343{
9344}
9345
9346template <class VALUE_TYPE, int BLOCK_LENGTH, class ALLOCATOR>
9347inline
9348DequePrimitives_DequeElementGuard<VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR>
9349 ::~DequePrimitives_DequeElementGuard()
9350{
9351 DequePrimitives<VALUE_TYPE, BLOCK_LENGTH>::destruct(d_begin,
9352 d_end,
9353 d_allocator);
9354}
9355
9356// MANIPULATORS
9357template <class VALUE_TYPE, int BLOCK_LENGTH, class ALLOCATOR>
9358inline
9359typename DequePrimitives_DequeElementGuard
9360<VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR>::Iterator&
9361DequePrimitives_DequeElementGuard<VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR>
9362 ::moveBegin(std::ptrdiff_t offset)
9363{
9364 d_begin += offset;
9365 return d_begin;
9366}
9367
9368template <class VALUE_TYPE, int BLOCK_LENGTH, class ALLOCATOR>
9369inline
9370typename DequePrimitives_DequeElementGuard
9371<VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR>::Iterator&
9372DequePrimitives_DequeElementGuard<VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR>
9373 ::moveEnd(std::ptrdiff_t offset)
9374{
9375 d_end += offset;
9376 return d_end;
9377}
9378
9379template <class VALUE_TYPE, int BLOCK_LENGTH, class ALLOCATOR>
9380inline
9381void DequePrimitives_DequeElementGuard<VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR>::
9382 release()
9383{
9384 d_begin = d_end;
9385}
9386
9387 // -----------------------------------------------
9388 // class DequePrimitives_ExternalDequeElementGuard
9389 // -----------------------------------------------
9390
9391// CREATORS
9392template <class VALUE_TYPE, int BLOCK_LENGTH, class ALLOCATOR>
9393inline
9394DequePrimitives_ExternalDequeElementGuard<VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR>
9395 ::DequePrimitives_ExternalDequeElementGuard(Iterator *begin,
9396 Iterator *end,
9397 ALLOCATOR allocator)
9398: d_begin_p(begin)
9399, d_end_p(end)
9400, d_allocator(allocator)
9401{
9402}
9403
9404template <class VALUE_TYPE, int BLOCK_LENGTH, class ALLOCATOR>
9405inline
9406DequePrimitives_ExternalDequeElementGuard<VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR>
9407 ::~DequePrimitives_ExternalDequeElementGuard()
9408{
9409 if (d_begin_p != d_end_p) {
9410 DequePrimitives<VALUE_TYPE, BLOCK_LENGTH>::destruct(*d_begin_p,
9411 *d_end_p,
9412 d_allocator);
9413 }
9414}
9415
9416// MANIPULATORS
9417template <class VALUE_TYPE, int BLOCK_LENGTH, class ALLOCATOR>
9418inline
9419void
9420DequePrimitives_ExternalDequeElementGuard<VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR>
9421 ::release()
9422{
9423 d_begin_p = d_end_p = 0;
9424}
9425
9426 // ------------------------------------
9427 // class DequePrimitives_DequeMoveGuard
9428 // ------------------------------------
9429
9430// CREATORS
9431template <class VALUE_TYPE, int BLOCK_LENGTH>
9432inline
9433DequePrimitives_DequeMoveGuard<VALUE_TYPE, BLOCK_LENGTH>
9434 ::DequePrimitives_DequeMoveGuard(Iterator dest,
9435 Iterator src,
9436 std::size_t size,
9437 bool isFront)
9438: d_destination_p(dest)
9439, d_source_p(src)
9440, d_size(size)
9441, d_front(isFront)
9442{
9443}
9444
9445template <class VALUE_TYPE, int BLOCK_LENGTH>
9446inline
9447DequePrimitives_DequeMoveGuard<VALUE_TYPE, BLOCK_LENGTH>
9448 ::~DequePrimitives_DequeMoveGuard()
9449{
9450 if (d_size != 0) {
9451 // We need to reverse 'moveFront'.
9452 if (d_front) {
9453 d_destination_p += d_size;
9454 d_source_p += d_size;
9455 DequePrimitives::moveBack(&d_destination_p, &d_source_p, d_size);
9456 }
9457 // We need to reverse 'moveBack'.
9458 else {
9459 d_destination_p -= d_size;
9460 d_source_p -= d_size;
9461 DequePrimitives::moveFront(&d_destination_p, &d_source_p, d_size);
9462 }
9463 }
9464}
9465
9466// MANIPULATORS
9467template <class VALUE_TYPE, int BLOCK_LENGTH>
9468inline
9469void DequePrimitives_DequeMoveGuard<VALUE_TYPE, BLOCK_LENGTH>::release()
9470{
9471 d_size = 0;
9472}
9473
9474 // ------------------------------------------
9475 // class DequePrimitives_DequeEndpointProctor
9476 // ------------------------------------------
9477
9478// CREATORS
9479template <class VALUE_TYPE, int BLOCK_LENGTH>
9480inline
9481DequePrimitives_DequeEndpointProctor<VALUE_TYPE, BLOCK_LENGTH>
9482 ::DequePrimitives_DequeEndpointProctor(Iterator *endpoint,
9483 Iterator position)
9484: d_endpoint_p(endpoint)
9485, d_position(position)
9486{
9487}
9488
9489template <class VALUE_TYPE, int BLOCK_LENGTH>
9490inline
9491DequePrimitives_DequeEndpointProctor<VALUE_TYPE, BLOCK_LENGTH>
9492 ::~DequePrimitives_DequeEndpointProctor()
9493{
9494 if (0 != d_endpoint_p) {
9495 *d_endpoint_p = d_position;
9496 }
9497}
9498
9499// MANIPULATORS
9500template <class VALUE_TYPE, int BLOCK_LENGTH>
9501inline
9502void DequePrimitives_DequeEndpointProctor<VALUE_TYPE, BLOCK_LENGTH>::release()
9503{
9504 d_endpoint_p = 0;
9505}
9506
9507} // close package namespace
9508
9509#ifndef BDE_OPENSOURCE_PUBLICATION // BACKWARD_COMPATIBILITY
9510// ============================================================================
9511// BACKWARD COMPATIBILITY
9512// ============================================================================
9513
9514#ifdef bslalg_DequePrimitives
9515#undef bslalg_DequePrimitives
9516#endif
9517/// This alias is defined for backward compatibility.
9518#define bslalg_DequePrimitives bslalg::DequePrimitives
9519#endif // BDE_OPENSOURCE_PUBLICATION -- BACKWARD_COMPATIBILITY
9520
9521
9522
9523#else // if ! defined(DEFINED_BSLALG_DEQUEPRIMITIVES_H)
9524# error Not valid except when included from bslalg_dequeprimitives.h
9525#endif // ! defined(COMPILING_BSLALG_DEQUEPRIMITIVES_H)
9526
9527#endif // ! defined(INCLUDED_BSLALG_DEQUEPRIMITIVES_CPP03)
9528
9529// ----------------------------------------------------------------------------
9530// Copyright 2013 Bloomberg Finance L.P.
9531//
9532// Licensed under the Apache License, Version 2.0 (the "License");
9533// you may not use this file except in compliance with the License.
9534// You may obtain a copy of the License at
9535//
9536// http://www.apache.org/licenses/LICENSE-2.0
9537//
9538// Unless required by applicable law or agreed to in writing, software
9539// distributed under the License is distributed on an "AS IS" BASIS,
9540// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9541// See the License for the specific language governing permissions and
9542// limitations under the License.
9543// ----------------------------- END-OF-FILE ----------------------------------
9544
9545/** @} */
9546/** @} */
9547/** @} */
Iterator & moveEnd(std::ptrdiff_t offset=1)
Definition bslalg_dequeprimitives.h:3399
Iterator & moveBegin(std::ptrdiff_t offset=-1)
Definition bslalg_dequeprimitives.h:3388
void release()
Definition bslalg_dequeprimitives.h:3408
~DequePrimitives_DequeElementGuard()
Definition bslalg_dequeprimitives.h:3375
DequeIterator< VALUE_TYPE, BLOCK_LENGTH > Iterator
Definition bslalg_dequeprimitives.h:897
void release()
Definition bslalg_dequeprimitives.h:3528
~DequePrimitives_DequeEndpointProctor()
Definition bslalg_dequeprimitives.h:3518
DequeIterator< VALUE_TYPE, BLOCK_LENGTH > Iterator
Definition bslalg_dequeprimitives.h:1073
void release()
Set the size of the range guarded by this object to be zero.
Definition bslalg_dequeprimitives.h:3495
~DequePrimitives_DequeMoveGuard()
Definition bslalg_dequeprimitives.h:3474
bslalg::DequePrimitives< VALUE_TYPE, BLOCK_LENGTH > DequePrimitives
Definition bslalg_dequeprimitives.h:1020
DequeIterator< VALUE_TYPE, BLOCK_LENGTH > Iterator
Definition bslalg_dequeprimitives.h:1019
~DequePrimitives_ExternalDequeElementGuard()
Definition bslalg_dequeprimitives.h:3433
void release()
Definition bslalg_dequeprimitives.h:3447
DequeIterator< VALUE_TYPE, BLOCK_LENGTH > Iterator
Definition bslalg_dequeprimitives.h:962
Definition bslma_destructorproctor.h:259
Definition bslmf_movableref.h:751
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1762
#define BSLS_COMPILERFEATURES_FORWARD_REF(T)
Definition bsls_compilerfeatures.h:2012
#define BSLS_COMPILERFEATURES_FORWARD(T, V)
Definition bsls_compilerfeatures.h:2018
#define BSLS_UTIL_ADDRESSOF(OBJ)
Definition bsls_util.h:289
bsl::size_t size(const TYPE &array)
Return the number of elements in the specified array.
deque< VALUE_TYPE, ALLOCATOR >::size_type erase(deque< VALUE_TYPE, ALLOCATOR > &deq, const BDE_OTHER_TYPE &value)
Definition bslstl_deque.h:4126
T::iterator begin(T &container)
Definition bslstl_iterator.h:1495
T::iterator end(T &container)
Definition bslstl_iterator.h:1523
Definition bdlc_flathashmap.h:1805
static void construct(ALLOCATOR_TYPE &basicAllocator, ELEMENT_TYPE *elementAddr, Args &&... arguments)
Definition bslma_allocatortraits.h:1472
static void destroy(ALLOCATOR_TYPE &basicAllocator, ELEMENT_TYPE *elementAddr)
Definition bslma_allocatortraits.h:1494
Definition bslmf_integralconstant.h:244
static void defaultConstruct(typename bsl::allocator_traits< ALLOCATOR >::pointer begin, size_type numElements, ALLOCATOR allocator)
Definition bslalg_arrayprimitives.h:2064
static void uninitializedFillN(typename bsl::allocator_traits< ALLOCATOR >::pointer begin, size_type numElements, const typename bsl::allocator_traits< ALLOCATOR >::value_type &value, ALLOCATOR allocator)
Definition bslalg_arrayprimitives.h:1905
Definition bslalg_dequeprimitives.h:243
static void moveBack(Iterator *destination, Iterator *source, size_type numElements)
Definition bslalg_dequeprimitives.h:2399
static void insertAndMoveToBack(Iterator *toEnd, Iterator fromEnd, Iterator position, size_type numElements, const VALUE_TYPE &value, ALLOCATOR allocator)
Definition bslalg_dequeprimitives.h:1281
static void insertAndMoveToFront(Iterator *toBegin, Iterator fromBegin, Iterator position, size_type numElements, const VALUE_TYPE &value, ALLOCATOR allocator)
Definition bslalg_dequeprimitives.h:1694
static void emplaceAndMoveToFrontDispatch(Iterator *toBegin, Iterator fromBegin, Iterator position, ALLOCATOR allocator, bsl::integral_constant< int, BITWISE_COPYABLE_TRAITS >, Args &&... arguments)
Definition bslalg_dequeprimitives.h:2272
static void uninitializedFillNFront(Iterator *toBegin, Iterator fromBegin, size_type numElements, const VALUE_TYPE &value, ALLOCATOR allocator)
Definition bslalg_dequeprimitives.h:2746
static void uninitializedFillNBack(Iterator *toEnd, Iterator fromEnd, size_type numElements, const VALUE_TYPE &value, ALLOCATOR allocator)
Definition bslalg_dequeprimitives.h:2653
static void moveInsertAndMoveToFront(Iterator *toBegin, Iterator fromBegin, Iterator position, bslmf::MovableRef< VALUE_TYPE > value, ALLOCATOR allocator)
Definition bslalg_dequeprimitives.h:1944
static void emplaceAndMoveToBack(Iterator *toEnd, Iterator fromEnd, Iterator position, ALLOCATOR allocator, Args &&... arguments)
Definition bslalg_dequeprimitives.h:2084
static void emplaceAndMoveToBackDispatch(Iterator *toEnd, Iterator fromEnd, Iterator position, ALLOCATOR allocator, bsl::integral_constant< int, BITWISE_COPYABLE_TRAITS >, Args &&... arguments)
Definition bslalg_dequeprimitives.h:2112
std::size_t size_type
Definition bslalg_dequeprimitives.h:246
static void emplaceAndMoveToFront(Iterator *toBegin, Iterator fromBegin, Iterator position, ALLOCATOR allocator, Args &&... arguments)
Definition bslalg_dequeprimitives.h:2244
DequeIterator< VALUE_TYPE, BLOCK_LENGTH > Iterator
Definition bslalg_dequeprimitives.h:247
static void valueInititalizeN(Iterator *toEnd, Iterator fromEnd, size_type numElements, ALLOCATOR allocator)
Definition bslalg_dequeprimitives.h:2702
static void moveInsertAndMoveToBack(Iterator *toEnd, Iterator fromEnd, Iterator position, bslmf::MovableRef< VALUE_TYPE > value, ALLOCATOR allocator)
Definition bslalg_dequeprimitives.h:1550
static Iterator erase(Iterator *toBegin, Iterator *toEnd, Iterator fromBegin, Iterator first, Iterator last, Iterator fromEnd, ALLOCATOR allocator)
Definition bslalg_dequeprimitives.h:1170
static void destruct(Iterator begin, Iterator end, ALLOCATOR allocator)
Definition bslalg_dequeprimitives.h:1122
static void moveFront(Iterator *destination, Iterator *source, size_type numElements)
Definition bslalg_dequeprimitives.h:2525
static void construct(TARGET_TYPE *address, const ALLOCATOR &allocator)
Definition bslma_constructionutil.h:1243
static Allocator * allocator(Allocator *basicAllocator=0)
Definition bslma_default.h:897
Definition bslmf_isbitwisecopyable.h:298
Definition bslmf_isbitwisemoveable.h:718
Definition bslmf_functionpointertraits.h:153
Definition bslmf_isfundamental.h:303
Definition bslmf_ispointer.h:225
Definition bslmf_movableref.h:791
Definition bsls_objectbuffer.h:276
TYPE & object()
Definition bsls_objectbuffer.h:351