11#ifndef INCLUDED_BSLALG_ARRAYPRIMITIVES_CPP03
12#define INCLUDED_BSLALG_ARRAYPRIMITIVES_CPP03
63#ifdef COMPILING_BSLALG_ARRAYPRIMITIVES_H
65#if defined(BSLS_PLATFORM_CMP_IBM)
66# define BSLALG_ARRAYPRIMITIVES_CANNOT_REMOVE_POINTER_FROM_FUNCTION_POINTER 1
69# define BSLALG_ARRAYPRIMITIVES_NON_ZERO_NULL_VALUE_FOR_MEMBER_POINTERS 1
77struct ArrayPrimitives_Imp;
90struct ArrayPrimitives {
94 typedef ArrayPrimitives_Imp
Imp;
110 template <
class ALLOCATOR,
class FWD_ITER,
class SENTINEL>
116 ALLOCATOR allocator);
117 template <
class ALLOCATOR,
class SOURCE_TYPE>
121 SOURCE_TYPE *fromBegin,
122 SOURCE_TYPE *fromEnd,
123 ALLOCATOR allocator);
136 template <
class TARGET_TYPE,
class FWD_ITER,
class SENTINEL>
141 template <
class TARGET_TYPE,
class SOURCE_TYPE>
143 SOURCE_TYPE *fromBegin,
144 SOURCE_TYPE *fromEnd,
158 template <
class ALLOCATOR>
164 ALLOCATOR allocator);
177 template <
class TARGET_TYPE>
179 TARGET_TYPE *fromBegin,
180 TARGET_TYPE *fromEnd,
192 template <
class ALLOCATOR>
196 ALLOCATOR allocator);
210 template <
class TARGET_TYPE>
232 template <
class ALLOCATOR>
237 ALLOCATOR allocator);
251 template <
class TARGET_TYPE>
253 TARGET_TYPE *fromBegin,
254 TARGET_TYPE *fromEnd,
257#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
260#ifndef BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT
261#define BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT 10
263#ifndef BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_A
264#define BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_A BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT
267#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_A >= 0
268 template <
class ALLOCATOR>
275 ALLOCATOR allocator);
278#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_A >= 1
279 template <
class ALLOCATOR,
class ARGS_01>
290#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_A >= 2
291 template <
class ALLOCATOR,
class ARGS_01,
304#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_A >= 3
305 template <
class ALLOCATOR,
class ARGS_01,
320#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_A >= 4
321 template <
class ALLOCATOR,
class ARGS_01,
338#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_A >= 5
339 template <
class ALLOCATOR,
class ARGS_01,
358#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_A >= 6
359 template <
class ALLOCATOR,
class ARGS_01,
380#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_A >= 7
381 template <
class ALLOCATOR,
class ARGS_01,
404#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_A >= 8
405 template <
class ALLOCATOR,
class ARGS_01,
430#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_A >= 9
431 template <
class ALLOCATOR,
class ARGS_01,
458#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_A >= 10
459 template <
class ALLOCATOR,
class ARGS_01,
492 template <
class ALLOCATOR,
class... ARGS>
528 template <
class ALLOCATOR>
536 ALLOCATOR allocator);
561 template <
class TARGET_TYPE>
563 TARGET_TYPE **fromEndPtr,
564 TARGET_TYPE *fromBegin,
565 TARGET_TYPE *position,
566 TARGET_TYPE *fromEnd,
591 template <
class ALLOCATOR>
600 ALLOCATOR allocator);
619 template <
class TARGET_TYPE>
621 TARGET_TYPE **fromEndPtr,
622 TARGET_TYPE *fromBegin,
623 TARGET_TYPE *position,
624 TARGET_TYPE *fromEnd,
625 const TARGET_TYPE& value,
654 template <
class ALLOCATOR,
class FWD_ITER,
class SENTINEL>
664 ALLOCATOR allocator);
686 template <
class TARGET_TYPE,
class FWD_ITER,
class SENTINEL>
688 TARGET_TYPE **fromEndPtr,
689 TARGET_TYPE *fromBegin,
690 TARGET_TYPE *position,
691 TARGET_TYPE *fromEnd,
717 template <
class ALLOCATOR>
728 ALLOCATOR allocator);
752 template <
class TARGET_TYPE>
754 TARGET_TYPE **fromEndPtr,
755 TARGET_TYPE **lastPtr,
756 TARGET_TYPE *fromBegin,
757 TARGET_TYPE *position,
758 TARGET_TYPE *fromEnd,
764#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
767#ifndef BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT
768#define BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT 10
770#ifndef BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B
771#define BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT
774#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 0
775 template <
class ALLOCATOR>
779 ALLOCATOR allocator);
782#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 1
783 template <
class ALLOCATOR,
class ARGS_01>
791#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 2
792 template <
class ALLOCATOR,
class ARGS_01,
802#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 3
803 template <
class ALLOCATOR,
class ARGS_01,
815#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 4
816 template <
class ALLOCATOR,
class ARGS_01,
830#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 5
831 template <
class ALLOCATOR,
class ARGS_01,
847#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 6
848 template <
class ALLOCATOR,
class ARGS_01,
866#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 7
867 template <
class ALLOCATOR,
class ARGS_01,
887#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 8
888 template <
class ALLOCATOR,
class ARGS_01,
910#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 9
911 template <
class ALLOCATOR,
class ARGS_01,
935#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 10
936 template <
class ALLOCATOR,
class ARGS_01,
963#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 0
964 template <
class TARGET_TYPE>
965 static void emplace(TARGET_TYPE *toBegin,
970#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 1
971 template <
class TARGET_TYPE,
class ARGS_01>
972 static void emplace(TARGET_TYPE *toBegin,
978#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 2
979 template <
class TARGET_TYPE,
class ARGS_01,
981 static void emplace(TARGET_TYPE *toBegin,
988#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 3
989 template <
class TARGET_TYPE,
class ARGS_01,
992 static void emplace(TARGET_TYPE *toBegin,
1000#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 4
1001 template <
class TARGET_TYPE,
class ARGS_01,
1005 static void emplace(TARGET_TYPE *toBegin,
1014#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 5
1015 template <
class TARGET_TYPE,
class ARGS_01,
1020 static void emplace(TARGET_TYPE *toBegin,
1030#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 6
1031 template <
class TARGET_TYPE,
class ARGS_01,
1037 static void emplace(TARGET_TYPE *toBegin,
1048#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 7
1049 template <
class TARGET_TYPE,
class ARGS_01,
1056 static void emplace(TARGET_TYPE *toBegin,
1068#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 8
1069 template <
class TARGET_TYPE,
class ARGS_01,
1077 static void emplace(TARGET_TYPE *toBegin,
1090#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 9
1091 template <
class TARGET_TYPE,
class ARGS_01,
1100 static void emplace(TARGET_TYPE *toBegin,
1114#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_B >= 10
1115 template <
class TARGET_TYPE,
class ARGS_01,
1125 static void emplace(TARGET_TYPE *toBegin,
1144 template <
class ALLOCATOR,
class... ARGS>
1148 ALLOCATOR allocator,
1151 template <
class TARGET_TYPE,
class... ARGS>
1152 static void emplace(TARGET_TYPE *toBegin,
1172 template <
class ALLOCATOR>
1177 ALLOCATOR allocator);
1189 template <
class TARGET_TYPE>
1190 static void erase(TARGET_TYPE *first,
1191 TARGET_TYPE *middle,
1206 template <
class ALLOCATOR>
1212 ALLOCATOR allocator);
1225 template <
class TARGET_TYPE>
1226 static void insert(TARGET_TYPE *toBegin,
1242 template <
class ALLOCATOR>
1249 ALLOCATOR allocator);
1263 template <
class TARGET_TYPE>
1264 static void insert(TARGET_TYPE *toBegin,
1266 const TARGET_TYPE& value,
1287 template <
class ALLOCATOR,
class FWD_ITER,
class SENTINEL>
1294 ALLOCATOR allocator);
1295 template <
class ALLOCATOR,
class SOURCE_TYPE>
1299 SOURCE_TYPE *fromBegin,
1300 SOURCE_TYPE *fromEnd,
1302 ALLOCATOR allocator);
1322 template <
class TARGET_TYPE,
class FWD_ITER,
class SENTINEL>
1323 static void insert(TARGET_TYPE *toBegin,
1329 template <
class TARGET_TYPE,
class SOURCE_TYPE>
1330 static void insert(TARGET_TYPE *toBegin,
1332 SOURCE_TYPE *fromBegin,
1333 SOURCE_TYPE *fromEnd,
1358 template <
class ALLOCATOR>
1366 ALLOCATOR allocator);
1388 template <
class TARGET_TYPE>
1391 TARGET_TYPE **fromEndPtr,
1392 TARGET_TYPE *fromBegin,
1393 TARGET_TYPE *fromEnd,
1408 template <
class TARGET_TYPE>
1409 static void rotate(TARGET_TYPE *first,
1410 TARGET_TYPE *middle,
1424 template <
class ALLOCATOR>
1429 ALLOCATOR allocator);
1446 template <
class TARGET_TYPE>
1449 const TARGET_TYPE& value,
1465struct ArrayPrimitives_Imp {
1476 template <
class TARGET_TYPE>
1477 static void assign(TARGET_TYPE *srcStart,
1478 TARGET_TYPE *srcEnd,
1479 TARGET_TYPE& value);
1492 template <
class TARGET_TYPE>
1493 static void reverseAssign(TARGET_TYPE *dest,
1494 TARGET_TYPE *srcStart,
1495 TARGET_TYPE *srcEnd);
1562 unsigned char *begin,
1563 unsigned char value,
1590 unsigned short *begin,
1591 unsigned short value,
1604 unsigned int *begin,
1618 unsigned long *begin,
1619 unsigned long value,
1674 volatile void **begin,
1675 volatile void *value,
1681 const volatile void **begin,
1682 const volatile void *value,
1687 template <
class TARGET_TYPE>
1689 TARGET_TYPE **begin,
1695 template <
class TARGET_TYPE>
1697 const TARGET_TYPE **begin,
1698 const TARGET_TYPE *value,
1703 template <
class TARGET_TYPE>
1705 volatile TARGET_TYPE **begin,
1706 volatile TARGET_TYPE *value,
1711 template <
class TARGET_TYPE>
1713 const volatile TARGET_TYPE **begin,
1714 const volatile TARGET_TYPE *value,
1719 template <
class TARGET_TYPE,
class ALLOCATOR>
1722 const TARGET_TYPE& value,
1724 ALLOCATOR *allocator,
1726 template <
class TARGET_TYPE,
class ALLOCATOR>
1729 const TARGET_TYPE& value,
1731 ALLOCATOR *allocator,
1745 template <
class TARGET_TYPE,
1750 TARGET_TYPE *toBegin,
1753 ALLOCATOR allocator,
1755 template <
class TARGET_TYPE,
class ALLOCATOR>
1757 TARGET_TYPE *toBegin,
1758 const TARGET_TYPE *fromBegin,
1759 const TARGET_TYPE *fromEnd,
1760 ALLOCATOR allocator,
1762 template <
class TARGET_TYPE,
1767 TARGET_TYPE *toBegin,
1770 ALLOCATOR allocator,
1772 template <
class FWD_ITER,
class SENTINEL,
class ALLOCATOR>
1777 ALLOCATOR allocator,
1779 template <
class TARGET_TYPE,
1784 TARGET_TYPE *toBegin,
1787 ALLOCATOR allocator,
1803 template <
class TARGET_TYPE,
class ALLOCATOR>
1805 TARGET_TYPE *toBegin,
1806 TARGET_TYPE *fromBegin,
1807 TARGET_TYPE *fromEnd,
1808 ALLOCATOR allocator,
1810 template <
class TARGET_TYPE,
class ALLOCATOR>
1812 TARGET_TYPE *toBegin,
1813 TARGET_TYPE *fromBegin,
1814 TARGET_TYPE *fromEnd,
1815 ALLOCATOR allocator,
1834 template <
class TARGET_TYPE,
class ALLOCATOR>
1836 TARGET_TYPE *toBegin,
1837 TARGET_TYPE *fromBegin,
1838 TARGET_TYPE *fromEnd,
1839 ALLOCATOR allocator,
1849 template <
class TARGET_TYPE,
class ALLOCATOR>
1853 ALLOCATOR allocator,
1855 template <
class TARGET_TYPE,
class ALLOCATOR>
1859 ALLOCATOR allocator,
1861 template <
class TARGET_TYPE,
class ALLOCATOR>
1865 ALLOCATOR allocator,
1875 template <
class TARGET_TYPE,
class ALLOCATOR>
1877 TARGET_TYPE *toBegin,
1878 TARGET_TYPE *fromBegin,
1879 TARGET_TYPE *fromEnd,
1880 ALLOCATOR allocator,
1882 template <
class TARGET_TYPE,
class ALLOCATOR>
1884 TARGET_TYPE *toBegin,
1885 TARGET_TYPE *fromBegin,
1886 TARGET_TYPE *fromEnd,
1887 ALLOCATOR allocator,
1890#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
1893#ifndef BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT
1894#define BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT 10
1896#ifndef BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C
1897#define BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT
1899#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 0
1900 template <
class TARGET_TYPE,
class ALLOCATOR>
1902 TARGET_TYPE *toBegin,
1904 ALLOCATOR allocator,
1908#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 1
1909 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01>
1911 TARGET_TYPE *toBegin,
1913 ALLOCATOR allocator,
1918#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 2
1919 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
1922 TARGET_TYPE *toBegin,
1924 ALLOCATOR allocator,
1930#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 3
1931 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
1935 TARGET_TYPE *toBegin,
1937 ALLOCATOR allocator,
1944#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 4
1945 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
1950 TARGET_TYPE *toBegin,
1952 ALLOCATOR allocator,
1960#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 5
1961 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
1967 TARGET_TYPE *toBegin,
1969 ALLOCATOR allocator,
1978#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 6
1979 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
1986 TARGET_TYPE *toBegin,
1988 ALLOCATOR allocator,
1998#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 7
1999 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2007 TARGET_TYPE *toBegin,
2009 ALLOCATOR allocator,
2020#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 8
2021 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2030 TARGET_TYPE *toBegin,
2032 ALLOCATOR allocator,
2044#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 9
2045 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2055 TARGET_TYPE *toBegin,
2057 ALLOCATOR allocator,
2070#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 10
2071 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2082 TARGET_TYPE *toBegin,
2084 ALLOCATOR allocator,
2098#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 0
2099 template <
class TARGET_TYPE,
class ALLOCATOR>
2101 TARGET_TYPE *toBegin,
2103 ALLOCATOR allocator,
2107#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 1
2108 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01>
2110 TARGET_TYPE *toBegin,
2112 ALLOCATOR allocator,
2117#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 2
2118 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2121 TARGET_TYPE *toBegin,
2123 ALLOCATOR allocator,
2129#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 3
2130 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2134 TARGET_TYPE *toBegin,
2136 ALLOCATOR allocator,
2143#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 4
2144 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2149 TARGET_TYPE *toBegin,
2151 ALLOCATOR allocator,
2159#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 5
2160 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2166 TARGET_TYPE *toBegin,
2168 ALLOCATOR allocator,
2177#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 6
2178 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2185 TARGET_TYPE *toBegin,
2187 ALLOCATOR allocator,
2197#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 7
2198 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2206 TARGET_TYPE *toBegin,
2208 ALLOCATOR allocator,
2219#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 8
2220 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2229 TARGET_TYPE *toBegin,
2231 ALLOCATOR allocator,
2243#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 9
2244 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2254 TARGET_TYPE *toBegin,
2256 ALLOCATOR allocator,
2269#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 10
2270 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2281 TARGET_TYPE *toBegin,
2283 ALLOCATOR allocator,
2297#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 0
2298 template <
class TARGET_TYPE,
class ALLOCATOR>
2300 TARGET_TYPE *toBegin,
2302 ALLOCATOR allocator,
2306#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 1
2307 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01>
2309 TARGET_TYPE *toBegin,
2311 ALLOCATOR allocator,
2316#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 2
2317 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2320 TARGET_TYPE *toBegin,
2322 ALLOCATOR allocator,
2328#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 3
2329 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2333 TARGET_TYPE *toBegin,
2335 ALLOCATOR allocator,
2342#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 4
2343 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2348 TARGET_TYPE *toBegin,
2350 ALLOCATOR allocator,
2358#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 5
2359 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2365 TARGET_TYPE *toBegin,
2367 ALLOCATOR allocator,
2376#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 6
2377 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2384 TARGET_TYPE *toBegin,
2386 ALLOCATOR allocator,
2396#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 7
2397 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2405 TARGET_TYPE *toBegin,
2407 ALLOCATOR allocator,
2418#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 8
2419 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2428 TARGET_TYPE *toBegin,
2430 ALLOCATOR allocator,
2442#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 9
2443 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2453 TARGET_TYPE *toBegin,
2455 ALLOCATOR allocator,
2468#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_C >= 10
2469 template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
2480 TARGET_TYPE *toBegin,
2482 ALLOCATOR allocator,
2499 template <
class TARGET_TYPE,
class ALLOCATOR,
class... ARGS>
2501 TARGET_TYPE *toBegin,
2503 ALLOCATOR allocator,
2506 template <
class TARGET_TYPE,
class ALLOCATOR,
class... ARGS>
2508 TARGET_TYPE *toBegin,
2510 ALLOCATOR allocator,
2513 template <
class TARGET_TYPE,
class ALLOCATOR,
class... ARGS>
2515 TARGET_TYPE *toBegin,
2517 ALLOCATOR allocator,
2530 template <
class TARGET_TYPE,
class ALLOCATOR>
2533 TARGET_TYPE *middle,
2535 ALLOCATOR allocator,
2537 template <
class TARGET_TYPE,
class ALLOCATOR>
2540 TARGET_TYPE *middle,
2542 ALLOCATOR allocator,
2553 template <
class TARGET_TYPE,
class ALLOCATOR>
2555 TARGET_TYPE *toBegin,
2557 const TARGET_TYPE& value,
2559 ALLOCATOR allocator,
2561 template <
class TARGET_TYPE,
class ALLOCATOR>
2563 TARGET_TYPE *toBegin,
2565 const TARGET_TYPE& value,
2567 ALLOCATOR allocator,
2569 template <
class TARGET_TYPE,
class ALLOCATOR>
2571 TARGET_TYPE *toBegin,
2573 const TARGET_TYPE& value,
2575 ALLOCATOR allocator,
2587 template <
class TARGET_TYPE,
2592 TARGET_TYPE *toBegin,
2597 ALLOCATOR allocator,
2599 template <
class TARGET_TYPE,
class ALLOCATOR>
2601 TARGET_TYPE *toBegin,
2603 const TARGET_TYPE *fromBegin,
2604 const TARGET_TYPE *fromEnd,
2606 ALLOCATOR allocator,
2608 template <
class TARGET_TYPE,
2613 TARGET_TYPE *toBegin,
2618 ALLOCATOR allocator,
2620 template <
class FWD_ITER,
class SENTINEL,
class ALLOCATOR>
2627 ALLOCATOR allocator,
2629 template <
class TARGET_TYPE,
2634 TARGET_TYPE *toBegin,
2639 ALLOCATOR allocator,
2646 template <
class TARGET_TYPE,
class ALLOCATOR>
2648 TARGET_TYPE *toBegin,
2650 TARGET_TYPE **lastPtr,
2654 ALLOCATOR allocator,
2656 template <
class TARGET_TYPE,
class ALLOCATOR>
2658 TARGET_TYPE *toBegin,
2660 TARGET_TYPE **lastPtr,
2664 ALLOCATOR allocator,
2674 template <
class TARGET_TYPE>
2677 TARGET_TYPE *middle,
2680 template <
class TARGET_TYPE>
2683 TARGET_TYPE *middle,
2693 template <
class ALLOCATOR>
2699 ALLOCATOR allocator,
2701 template <
class ALLOCATOR>
2707 ALLOCATOR allocator,
2709 template <
class ALLOCATOR>
2715 ALLOCATOR allocator,
2722 static void bitwiseRotate(
char *begin,
char *middle,
char *end);
2765 template <
class FORWARD_ITERATOR,
class SENTINEL>
2766 static bool isInvalidRange(FORWARD_ITERATOR begin, SENTINEL end);
2767 template <
class TARGET_TYPE>
2768 static bool isInvalidRange(TARGET_TYPE *begin, TARGET_TYPE *end);
2782template <
class FROM_TYPE,
class TO_TYPE>
2783struct ArrayPrimitives_CanBitwiseCopy
2786 typename bsl::remove_const<FROM_TYPE>::type,
2787 typename bsl::remove_const<TO_TYPE >::type>
2789 && bslmf::IsBitwiseCopyable<
2790 typename bsl::remove_const<TO_TYPE >::type>
2799template <
class ALLOCATOR>
2803 size_type numElements,
2805 ALLOCATOR allocator)
2823 k_IS_FUNDAMENTAL_OR_POINTER = k_IS_FUNDAMENTAL ||
2824 (k_IS_POINTER && !k_IS_FUNCTION_POINTER),
2830 : k_IS_BITWISECOPYABLE ?
Imp::e_BITWISE_COPYABLE_TRAITS
2841template <
class TARGET_TYPE>
2845 const TARGET_TYPE& value,
2848 uninitializedFillN<bsl::allocator<TARGET_TYPE> >(
begin,
2854template <
class ALLOCATOR,
class FWD_ITER,
class SENTINEL>
2859 ALLOCATOR allocator)
2880 typedef typename FWD_ITER::value_type FwdTarget;
2891 k_VALUE = k_ITER_TO_FUNC_PTRS && k_TARGET_IS_VOID_PTR
2903template <
class TARGET_TYPE,
class FWD_ITER,
class SENTINEL>
2910 copyConstruct<bsl::allocator<TARGET_TYPE> >(toBegin,
2916template <
class ALLOCATOR,
class SOURCE_TYPE>
2920 SOURCE_TYPE *fromBegin,
2921 SOURCE_TYPE *fromEnd,
2922 ALLOCATOR allocator)
2931 k_IS_BITWISECOPYABLE =
2945template <
class TARGET_TYPE,
class SOURCE_TYPE>
2948 SOURCE_TYPE *fromBegin,
2949 SOURCE_TYPE *fromEnd,
2952 copyConstruct<bsl::allocator<TARGET_TYPE> >(toBegin,
2958template <
class ALLOCATOR>
2963 ALLOCATOR allocator)
2974#if !defined(BSLALG_ARRAYPRIMITIVES_NON_ZERO_NULL_VALUE_FOR_MEMBER_POINTERS)
2990template <
class TARGET_TYPE>
2996 defaultConstruct<bsl::allocator<TARGET_TYPE> >(
begin,
3001template <
class ALLOCATOR>
3007 ALLOCATOR allocator)
3027template <
class TARGET_TYPE>
3030 TARGET_TYPE *fromBegin,
3031 TARGET_TYPE *fromEnd,
3034 destructiveMove<bsl::allocator<TARGET_TYPE> >(toBegin,
3040#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
3043#ifndef BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT
3044#define BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT 10
3046#ifndef BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_D
3047#define BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_D BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT
3049#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_D >= 0
3050template <
class ALLOCATOR>
3057 ALLOCATOR allocator)
3062 *fromEndPtr = fromEnd;
3065 TargetType *toPositionBegin = toBegin + (position - fromBegin);
3071 TargetType *toPositionEnd = toPositionBegin + 1;
3073 AutoArrayDestructor<TargetType, ALLOCATOR> guard(toPositionBegin,
3083 *fromEndPtr = position;
3084 guard.moveEnd(fromEnd - position);
3092 *fromEndPtr = fromBegin;
3097#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_D >= 1
3098template <
class ALLOCATOR,
class ARGS_01>
3105 ALLOCATOR allocator,
3111 *fromEndPtr = fromEnd;
3114 TargetType *toPositionBegin = toBegin + (position - fromBegin);
3121 TargetType *toPositionEnd = toPositionBegin + 1;
3123 AutoArrayDestructor<TargetType, ALLOCATOR> guard(toPositionBegin,
3133 *fromEndPtr = position;
3134 guard.moveEnd(fromEnd - position);
3142 *fromEndPtr = fromBegin;
3147#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_D >= 2
3148template <
class ALLOCATOR,
class ARGS_01,
3156 ALLOCATOR allocator,
3163 *fromEndPtr = fromEnd;
3166 TargetType *toPositionBegin = toBegin + (position - fromBegin);
3174 TargetType *toPositionEnd = toPositionBegin + 1;
3176 AutoArrayDestructor<TargetType, ALLOCATOR> guard(toPositionBegin,
3186 *fromEndPtr = position;
3187 guard.moveEnd(fromEnd - position);
3195 *fromEndPtr = fromBegin;
3200#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_D >= 3
3201template <
class ALLOCATOR,
class ARGS_01,
3210 ALLOCATOR allocator,
3218 *fromEndPtr = fromEnd;
3221 TargetType *toPositionBegin = toBegin + (position - fromBegin);
3230 TargetType *toPositionEnd = toPositionBegin + 1;
3232 AutoArrayDestructor<TargetType, ALLOCATOR> guard(toPositionBegin,
3242 *fromEndPtr = position;
3243 guard.moveEnd(fromEnd - position);
3251 *fromEndPtr = fromBegin;
3256#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_D >= 4
3257template <
class ALLOCATOR,
class ARGS_01,
3267 ALLOCATOR allocator,
3276 *fromEndPtr = fromEnd;
3279 TargetType *toPositionBegin = toBegin + (position - fromBegin);
3289 TargetType *toPositionEnd = toPositionBegin + 1;
3291 AutoArrayDestructor<TargetType, ALLOCATOR> guard(toPositionBegin,
3301 *fromEndPtr = position;
3302 guard.moveEnd(fromEnd - position);
3310 *fromEndPtr = fromBegin;
3315#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_D >= 5
3316template <
class ALLOCATOR,
class ARGS_01,
3327 ALLOCATOR allocator,
3337 *fromEndPtr = fromEnd;
3340 TargetType *toPositionBegin = toBegin + (position - fromBegin);
3351 TargetType *toPositionEnd = toPositionBegin + 1;
3353 AutoArrayDestructor<TargetType, ALLOCATOR> guard(toPositionBegin,
3363 *fromEndPtr = position;
3364 guard.moveEnd(fromEnd - position);
3372 *fromEndPtr = fromBegin;
3377#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_D >= 6
3378template <
class ALLOCATOR,
class ARGS_01,
3390 ALLOCATOR allocator,
3401 *fromEndPtr = fromEnd;
3404 TargetType *toPositionBegin = toBegin + (position - fromBegin);
3416 TargetType *toPositionEnd = toPositionBegin + 1;
3418 AutoArrayDestructor<TargetType, ALLOCATOR> guard(toPositionBegin,
3428 *fromEndPtr = position;
3429 guard.moveEnd(fromEnd - position);
3437 *fromEndPtr = fromBegin;
3442#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_D >= 7
3443template <
class ALLOCATOR,
class ARGS_01,
3456 ALLOCATOR allocator,
3468 *fromEndPtr = fromEnd;
3471 TargetType *toPositionBegin = toBegin + (position - fromBegin);
3484 TargetType *toPositionEnd = toPositionBegin + 1;
3486 AutoArrayDestructor<TargetType, ALLOCATOR> guard(toPositionBegin,
3496 *fromEndPtr = position;
3497 guard.moveEnd(fromEnd - position);
3505 *fromEndPtr = fromBegin;
3510#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_D >= 8
3511template <
class ALLOCATOR,
class ARGS_01,
3525 ALLOCATOR allocator,
3538 *fromEndPtr = fromEnd;
3541 TargetType *toPositionBegin = toBegin + (position - fromBegin);
3555 TargetType *toPositionEnd = toPositionBegin + 1;
3557 AutoArrayDestructor<TargetType, ALLOCATOR> guard(toPositionBegin,
3567 *fromEndPtr = position;
3568 guard.moveEnd(fromEnd - position);
3576 *fromEndPtr = fromBegin;
3581#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_D >= 9
3582template <
class ALLOCATOR,
class ARGS_01,
3597 ALLOCATOR allocator,
3611 *fromEndPtr = fromEnd;
3614 TargetType *toPositionBegin = toBegin + (position - fromBegin);
3629 TargetType *toPositionEnd = toPositionBegin + 1;
3631 AutoArrayDestructor<TargetType, ALLOCATOR> guard(toPositionBegin,
3641 *fromEndPtr = position;
3642 guard.moveEnd(fromEnd - position);
3650 *fromEndPtr = fromBegin;
3655#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_D >= 10
3656template <
class ALLOCATOR,
class ARGS_01,
3672 ALLOCATOR allocator,
3687 *fromEndPtr = fromEnd;
3690 TargetType *toPositionBegin = toBegin + (position - fromBegin);
3706 TargetType *toPositionEnd = toPositionBegin + 1;
3708 AutoArrayDestructor<TargetType, ALLOCATOR> guard(toPositionBegin,
3718 *fromEndPtr = position;
3719 guard.moveEnd(fromEnd - position);
3727 *fromEndPtr = fromBegin;
3735template <
class ALLOCATOR,
class... ARGS>
3742 ALLOCATOR allocator,
3748 *fromEndPtr = fromEnd;
3751 TargetType *toPositionBegin = toBegin + (position - fromBegin);
3758 TargetType *toPositionEnd = toPositionBegin + 1;
3760 AutoArrayDestructor<TargetType, ALLOCATOR> guard(toPositionBegin,
3770 *fromEndPtr = position;
3771 guard.moveEnd(fromEnd - position);
3779 *fromEndPtr = fromBegin;
3785template <
class ALLOCATOR>
3793 ALLOCATOR allocator)
3807 *fromEndPtr = fromEnd;
3815 TargetType *toPositionBegin = toBegin + (position - fromBegin);
3818 TargetType *toPositionEnd = toPositionBegin + numElements;
3820 AutoArrayDestructor<TargetType, ALLOCATOR> guard(toPositionBegin,
3834 *fromEndPtr = position;
3835 guard.moveEnd(fromEnd - position);
3847 *fromEndPtr = fromBegin;
3851template <
class TARGET_TYPE>
3854 TARGET_TYPE *toBegin,
3855 TARGET_TYPE **fromEndPtr,
3856 TARGET_TYPE *fromBegin,
3857 TARGET_TYPE *position,
3858 TARGET_TYPE *fromEnd,
3862 destructiveMoveAndInsert<bsl::allocator<TARGET_TYPE> >(toBegin,
3871template <
class ALLOCATOR>
3880 ALLOCATOR allocator)
3894 *fromEndPtr = fromEnd;
3905 TargetType *toPositionBegin = toBegin + (position - fromBegin);
3908 TargetType *toPositionEnd = toPositionBegin + numElements;
3910 AutoArrayDestructor<TargetType, ALLOCATOR> guard(toPositionBegin,
3924 *fromEndPtr = position;
3925 guard.moveEnd(fromEnd - position);
3937 *fromEndPtr = fromBegin;
3941template <
class TARGET_TYPE>
3943 TARGET_TYPE *toBegin,
3944 TARGET_TYPE **fromEndPtr,
3945 TARGET_TYPE *fromBegin,
3946 TARGET_TYPE *position,
3947 TARGET_TYPE *fromEnd,
3948 const TARGET_TYPE& value,
3952 destructiveMoveAndInsert<bsl::allocator<TARGET_TYPE> >(toBegin,
3962template <
class ALLOCATOR,
class FWD_ITER,
class SENTINEL>
3972 ALLOCATOR allocator)
3986 *fromEndPtr = fromEnd;
3996 TargetType *toPositionBegin = toBegin + (position - fromBegin);
3999 TargetType *toPositionEnd = toPositionBegin + numElements;
4001 AutoArrayDestructor<TargetType, ALLOCATOR> guard(toPositionBegin,
4015 *fromEndPtr = position;
4016 guard.moveEnd(fromEnd - position);
4028 *fromEndPtr = fromBegin;
4032template <
class TARGET_TYPE,
class FWD_ITER,
class SENTINEL>
4035 TARGET_TYPE *toBegin,
4036 TARGET_TYPE **fromEndPtr,
4037 TARGET_TYPE *fromBegin,
4038 TARGET_TYPE *position,
4039 TARGET_TYPE *fromEnd,
4045 destructiveMoveAndInsert<bsl::allocator<TARGET_TYPE> >(toBegin,
4056template <
class ALLOCATOR>
4067 ALLOCATOR allocator)
4082 *fromEndPtr = fromEnd;
4089 TargetType *toPositionBegin = toBegin + (position - fromBegin);
4090 TargetType *toPositionEnd = toPositionBegin + numElements;
4097 *fromEndPtr = position;
4099 AutoArrayDestructor<TargetType, ALLOCATOR>
4100 guard(toPositionEnd,
4101 toPositionEnd + (fromEnd - position),
4127 *fromEndPtr = fromBegin;
4131template <
class TARGET_TYPE>
4134 TARGET_TYPE *toBegin,
4135 TARGET_TYPE **fromEndPtr,
4136 TARGET_TYPE **lastPtr,
4137 TARGET_TYPE *fromBegin,
4138 TARGET_TYPE *position,
4139 TARGET_TYPE *fromEnd,
4145 destructiveMoveAndMoveInsert<bsl::allocator<TARGET_TYPE> >(toBegin,
4157#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
4160#ifndef BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT
4161#define BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT 10
4163#ifndef BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E
4164#define BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT
4166#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 0
4167template <
class ALLOCATOR>
4172 ALLOCATOR allocator)
4196#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 1
4197template <
class ALLOCATOR,
class ARGS_01>
4202 ALLOCATOR allocator,
4228#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 2
4229template <
class ALLOCATOR,
class ARGS_01,
4235 ALLOCATOR allocator,
4263#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 3
4264template <
class ALLOCATOR,
class ARGS_01,
4271 ALLOCATOR allocator,
4301#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 4
4302template <
class ALLOCATOR,
class ARGS_01,
4310 ALLOCATOR allocator,
4342#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 5
4343template <
class ALLOCATOR,
class ARGS_01,
4352 ALLOCATOR allocator,
4386#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 6
4387template <
class ALLOCATOR,
class ARGS_01,
4397 ALLOCATOR allocator,
4433#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 7
4434template <
class ALLOCATOR,
class ARGS_01,
4445 ALLOCATOR allocator,
4483#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 8
4484template <
class ALLOCATOR,
class ARGS_01,
4496 ALLOCATOR allocator,
4536#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 9
4537template <
class ALLOCATOR,
class ARGS_01,
4550 ALLOCATOR allocator,
4592#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 10
4593template <
class ALLOCATOR,
class ARGS_01,
4607 ALLOCATOR allocator,
4652#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 0
4653template <
class TARGET_TYPE>
4659 emplace<bsl::allocator<TARGET_TYPE> >(
4666#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 1
4667template <
class TARGET_TYPE,
class ARGS_01>
4674 emplace<bsl::allocator<TARGET_TYPE> >(
4682#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 2
4683template <
class TARGET_TYPE,
class ARGS_01,
4692 emplace<bsl::allocator<TARGET_TYPE> >(
4701#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 3
4702template <
class TARGET_TYPE,
class ARGS_01,
4713 emplace<bsl::allocator<TARGET_TYPE> >(
4723#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 4
4724template <
class TARGET_TYPE,
class ARGS_01,
4737 emplace<bsl::allocator<TARGET_TYPE> >(
4748#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 5
4749template <
class TARGET_TYPE,
class ARGS_01,
4764 emplace<bsl::allocator<TARGET_TYPE> >(
4776#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 6
4777template <
class TARGET_TYPE,
class ARGS_01,
4794 emplace<bsl::allocator<TARGET_TYPE> >(
4807#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 7
4808template <
class TARGET_TYPE,
class ARGS_01,
4827 emplace<bsl::allocator<TARGET_TYPE> >(
4841#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 8
4842template <
class TARGET_TYPE,
class ARGS_01,
4863 emplace<bsl::allocator<TARGET_TYPE> >(
4878#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 9
4879template <
class TARGET_TYPE,
class ARGS_01,
4902 emplace<bsl::allocator<TARGET_TYPE> >(
4918#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_E >= 10
4919template <
class TARGET_TYPE,
class ARGS_01,
4944 emplace<bsl::allocator<TARGET_TYPE> >(
4964template <
class ALLOCATOR,
class... ARGS>
4969 ALLOCATOR allocator,
4994template <
class TARGET_TYPE,
class... ARGS>
5001 emplace<bsl::allocator<TARGET_TYPE> >(
5011template <
class ALLOCATOR>
5017 ALLOCATOR allocator)
5024 if (first == middle) {
5041template <
class TARGET_TYPE>
5044 TARGET_TYPE *middle,
5048 erase<bsl::allocator<TARGET_TYPE> >(first,
5054template <
class ALLOCATOR>
5061 ALLOCATOR allocator)
5068 if (toBegin != toEnd) {
5094template <
class TARGET_TYPE>
5101 insert<bsl::allocator<TARGET_TYPE> >(toBegin,
5107template <
class ALLOCATOR>
5113 ALLOCATOR allocator)
5120 if (0 == numElements) {
5139template <
class TARGET_TYPE>
5143 const TARGET_TYPE& value,
5147 insert<bsl::allocator<TARGET_TYPE> >(toBegin,
5154template <
class ALLOCATOR,
class FWD_ITER,
class SENTINEL>
5161 ALLOCATOR allocator)
5163 if (0 == numElements) {
5185 typedef typename FWD_ITER::value_type FwdTarget;
5196 k_VALUE = k_ITER_TO_FUNC_PTRS && k_TARGET_IS_VOID_PTR
5209template <
class TARGET_TYPE,
class FWD_ITER,
class SENTINEL>
5218 insert<bsl::allocator<TARGET_TYPE> >(toBegin,
5226template <
class ALLOCATOR,
class SOURCE_TYPE>
5230 SOURCE_TYPE *fromBegin,
5231 SOURCE_TYPE *fromEnd,
5233 ALLOCATOR allocator)
5235 if (0 == numElements) {
5245 k_IS_BITWISECOPYABLE =
5261template <
class TARGET_TYPE,
class SOURCE_TYPE>
5265 SOURCE_TYPE *fromBegin,
5266 SOURCE_TYPE *fromEnd,
5270 insert<bsl::allocator<TARGET_TYPE> >(toBegin,
5278template <
class ALLOCATOR>
5284 ALLOCATOR allocator)
5303template <
class TARGET_TYPE>
5306 TARGET_TYPE *fromBegin,
5307 TARGET_TYPE *fromEnd,
5310 moveConstruct<bsl::allocator<TARGET_TYPE> >(toBegin,
5316template <
class ALLOCATOR>
5325 ALLOCATOR allocator)
5344template <
class TARGET_TYPE>
5348 TARGET_TYPE **fromEndPtr,
5349 TARGET_TYPE *fromBegin,
5350 TARGET_TYPE *fromEnd,
5354 moveInsert<bsl::allocator<TARGET_TYPE> >(toBegin,
5363template <
class TARGET_TYPE>
5366 TARGET_TYPE *middle,
5390template <
class TARGET_TYPE>
5392void ArrayPrimitives_Imp::assign(TARGET_TYPE *srcStart,
5393 TARGET_TYPE *srcEnd,
5396 for ( ; srcStart != srcEnd; ++srcStart) {
5401template <
class FORWARD_ITERATOR,
class SENTINEL>
5415template <
class TARGET_TYPE>
5423template <
class TARGET_TYPE>
5425void ArrayPrimitives_Imp::reverseAssign(TARGET_TYPE *dest,
5426 TARGET_TYPE *srcStart,
5427 TARGET_TYPE *srcEnd)
5429 TARGET_TYPE *destEnd = srcEnd - srcStart + dest;
5430 while (srcStart != srcEnd) {
5431 *--destEnd = *--srcEnd;
5451 std::memset(
reinterpret_cast<char *
>(begin),
5452 static_cast<char>(value),
5469 std::memset(begin, value, numElements);
5475 unsigned char *begin,
5476 unsigned char value,
5485 std::memset(begin, value, numElements);
5501 std::memset(begin, value, numElements);
5517 std::wmemset(begin, value, numElements);
5523 unsigned short *begin,
5524 unsigned short value,
5533 reinterpret_cast<short *
>(begin),
5534 static_cast<short>(value),
5542 unsigned int *begin,
5552 reinterpret_cast<int *
>(begin),
5553 static_cast<int>(value),
5570#if defined(BSLS_PLATFORM_CPU_64_BIT) && !defined(BSLS_PLATFORM_OS_WINDOWS)
5576 reinterpret_cast<int *
>(begin),
5577 static_cast<int>(value),
5586 unsigned long *begin,
5587 unsigned long value,
5595#if defined(BSLS_PLATFORM_CPU_64_BIT) && !defined(BSLS_PLATFORM_OS_WINDOWS)
5604 reinterpret_cast<int *
>(begin),
5605 static_cast<int>(value),
5631template <
class TARGET_TYPE>
5634 TARGET_TYPE **begin,
5651 reinterpret_cast<void **
>(begin),
5652 static_cast<void *
>(value),
5658template <
class TARGET_TYPE>
5661 const TARGET_TYPE **begin,
5662 const TARGET_TYPE *value,
5674 reinterpret_cast<const void **
>(begin),
5675 static_cast<const void *
>(value),
5681template <
class TARGET_TYPE>
5684 volatile TARGET_TYPE **begin,
5685 volatile TARGET_TYPE *value,
5697 reinterpret_cast<volatile void **
>(begin),
5698 static_cast<volatile void *
>(value),
5704template <
class TARGET_TYPE>
5707 const volatile TARGET_TYPE **begin,
5708 const volatile TARGET_TYPE *value,
5720 reinterpret_cast<const volatile void **
>(begin),
5721 static_cast<const volatile void *
>(value),
5727template <
class TARGET_TYPE,
class ALLOCATOR>
5730 const TARGET_TYPE& value,
5738 if (0 == numElements) {
5742 const char *valueBuffer =
5745 std::memcpy((
void *)begin, valueBuffer,
sizeof(TARGET_TYPE));
5746 bitwiseFillN(
reinterpret_cast<char *
>(begin),
5747 sizeof(TARGET_TYPE),
5748 sizeof(TARGET_TYPE) * numElements);
5751template <
class TARGET_TYPE,
class ALLOCATOR>
5754 const TARGET_TYPE& value,
5756 ALLOCATOR *allocator,
5763 if (0 == numElements) {
5766 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(begin,
5770 TARGET_TYPE *
end =
begin + numElements;
5773 begin = guard.moveEnd(1);
5774 }
while (begin != end);
5780template <
class TARGET_TYPE,
class FWD_ITER,
class SENTINEL,
class ALLOCATOR>
5783 TARGET_TYPE *toBegin,
5786 ALLOCATOR allocator,
5801#if defined(BSLALG_ARRAYPRIMITIVES_CANNOT_REMOVE_POINTER_FROM_FUNCTION_POINTER)
5804 (
void *
const *)fromBegin,
5805 (
void *
const *)fromEnd,
5810 reinterpret_cast<void * *
>(
const_cast<NcPtrType **
>(toBegin)),
5811 reinterpret_cast<void *
const *
>(
const_cast<NcIter *
const *
>(fromBegin)),
5812 reinterpret_cast<void *
const *
>(
const_cast<NcIter *
const *
>(fromEnd)),
5818template <
class FWD_ITER,
class SENTINEL,
class ALLOCATOR>
5834 while (fromBegin != fromEnd) {
5838 *toBegin =
reinterpret_cast<void *
>(*fromBegin);
5844template <
class TARGET_TYPE,
class ALLOCATOR>
5847 TARGET_TYPE *toBegin,
5848 const TARGET_TYPE *fromBegin,
5849 const TARGET_TYPE *fromEnd,
5857 const size_type numBytes =
reinterpret_cast<const char*
>(fromEnd)
5858 -
reinterpret_cast<const char*
>(fromBegin);
5860 std::memcpy((
void *)toBegin, fromBegin, numBytes);
5864template <
class TARGET_TYPE,
class FWD_ITER,
class SENTINEL,
class ALLOCATOR>
5866 TARGET_TYPE *toBegin,
5869 ALLOCATOR allocator,
5876 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toBegin, toBegin,
5879 while (fromBegin != fromEnd) {
5887 toBegin = guard.moveEnd(1);
5893template <
class TARGET_TYPE,
class ALLOCATOR>
5896 TARGET_TYPE *toBegin,
5897 TARGET_TYPE *fromBegin,
5898 TARGET_TYPE *fromEnd,
5906 const size_type numBytes =
reinterpret_cast<const char*
>(fromEnd)
5907 -
reinterpret_cast<const char*
>(fromBegin);
5909 std::memcpy((
void *)toBegin, fromBegin, numBytes);
5913template <
class TARGET_TYPE,
class ALLOCATOR>
5915 TARGET_TYPE *toBegin,
5916 TARGET_TYPE *fromBegin,
5917 TARGET_TYPE *fromEnd,
5918 ALLOCATOR allocator,
5925 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toBegin, toBegin,
5928 while (fromBegin != fromEnd) {
5934 toBegin = guard.moveEnd(1);
5939template <
class TARGET_TYPE,
class ALLOCATOR>
5941 TARGET_TYPE *toBegin,
5942 TARGET_TYPE *fromBegin,
5943 TARGET_TYPE *fromEnd,
5944 ALLOCATOR allocator,
5951 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toBegin, toBegin,
5954 while (fromBegin != fromEnd) {
5960 toBegin = guard.moveEnd(1);
5968template <
class TARGET_TYPE,
class ALLOCATOR>
5980 std::memset(
static_cast<void *
>(begin),
5982 sizeof(TARGET_TYPE) * numElements);
5986template <
class TARGET_TYPE,
class ALLOCATOR>
5991 ALLOCATOR allocator,
5997 if (0 < numElements) {
5999 bitwiseFillN(
reinterpret_cast<char *
>(begin),
6000 sizeof(TARGET_TYPE),
6001 numElements *
sizeof(TARGET_TYPE));
6005template <
class TARGET_TYPE,
class ALLOCATOR>
6009 ALLOCATOR allocator,
6015 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(begin, begin, allocator);
6017 const TARGET_TYPE *
end =
begin + numElements;
6018 while (begin != end) {
6020 begin = guard.moveEnd(1);
6027template <
class TARGET_TYPE,
class ALLOCATOR>
6030 TARGET_TYPE *toBegin,
6031 TARGET_TYPE *fromBegin,
6032 TARGET_TYPE *fromEnd,
6040 const size_type numBytes =
reinterpret_cast<const char*
>(fromEnd)
6041 -
reinterpret_cast<const char*
>(fromBegin);
6043 std::memcpy((
void *)toBegin, fromBegin, numBytes);
6047template <
class TARGET_TYPE,
class ALLOCATOR>
6050 TARGET_TYPE *toBegin,
6051 TARGET_TYPE *fromBegin,
6052 TARGET_TYPE *fromEnd,
6053 ALLOCATOR allocator,
6063 moveIfNoexcept(toBegin, fromBegin, fromEnd, allocator,
6070#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
6073#ifndef BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT
6074#define BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT 10
6076#ifndef BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F
6077#define BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT
6079#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 0
6080template <
class TARGET_TYPE,
class ALLOCATOR>
6083 TARGET_TYPE *toBegin,
6085 ALLOCATOR allocator,
6097#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 1
6098template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01>
6101 TARGET_TYPE *toBegin,
6103 ALLOCATOR allocator,
6117#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 2
6118template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
6122 TARGET_TYPE *toBegin,
6124 ALLOCATOR allocator,
6140#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 3
6141template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
6146 TARGET_TYPE *toBegin,
6148 ALLOCATOR allocator,
6166#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 4
6167template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
6173 TARGET_TYPE *toBegin,
6175 ALLOCATOR allocator,
6195#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 5
6196template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
6203 TARGET_TYPE *toBegin,
6205 ALLOCATOR allocator,
6227#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 6
6228template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
6236 TARGET_TYPE *toBegin,
6238 ALLOCATOR allocator,
6262#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 7
6263template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
6272 TARGET_TYPE *toBegin,
6274 ALLOCATOR allocator,
6300#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 8
6301template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
6311 TARGET_TYPE *toBegin,
6313 ALLOCATOR allocator,
6341#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 9
6342template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
6353 TARGET_TYPE *toBegin,
6355 ALLOCATOR allocator,
6385#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 10
6386template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
6398 TARGET_TYPE *toBegin,
6400 ALLOCATOR allocator,
6433#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 0
6434template <
class TARGET_TYPE,
class ALLOCATOR>
6436 TARGET_TYPE *toBegin,
6438 ALLOCATOR allocator,
6449 size_type numGuarded = tailLen < numElements ? tailLen : numElements;
6452 TARGET_TYPE *destBegin = toBegin + numElements;
6454 std::memmove((
void *)destBegin,
6456 tailLen *
sizeof(TARGET_TYPE));
6460 TARGET_TYPE *destEnd = toEnd + numElements;
6462 AutoArrayMoveDestructor<TARGET_TYPE, ALLOCATOR> guard(toBegin,
6463 destEnd - numGuarded,
6464 destEnd - numGuarded,
6468 while (guard.middle() != guard.end()) {
6470 guard.destination());
6475 if (tailLen < numElements) {
6477 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> endGuard(destBegin,
6482 while (toEnd != destBegin) {
6486 endGuard.moveBegin(-1);
6493#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 1
6494template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01>
6496 TARGET_TYPE *toBegin,
6498 ALLOCATOR allocator,
6510 size_type numGuarded = tailLen < numElements ? tailLen : numElements;
6513 TARGET_TYPE *destBegin = toBegin + numElements;
6515 std::memmove((
void *)destBegin,
6517 tailLen *
sizeof(TARGET_TYPE));
6521 TARGET_TYPE *destEnd = toEnd + numElements;
6523 AutoArrayMoveDestructor<TARGET_TYPE, ALLOCATOR> guard(toBegin,
6524 destEnd - numGuarded,
6525 destEnd - numGuarded,
6529 while (guard.middle() != guard.end()) {
6531 guard.destination(),
6537 if (tailLen < numElements) {
6539 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> endGuard(destBegin,
6544 while (toEnd != destBegin) {
6549 endGuard.moveBegin(-1);
6556#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 2
6557template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
6560 TARGET_TYPE *toBegin,
6562 ALLOCATOR allocator,
6575 size_type numGuarded = tailLen < numElements ? tailLen : numElements;
6578 TARGET_TYPE *destBegin = toBegin + numElements;
6580 std::memmove((
void *)destBegin,
6582 tailLen *
sizeof(TARGET_TYPE));
6586 TARGET_TYPE *destEnd = toEnd + numElements;
6588 AutoArrayMoveDestructor<TARGET_TYPE, ALLOCATOR> guard(toBegin,
6589 destEnd - numGuarded,
6590 destEnd - numGuarded,
6594 while (guard.middle() != guard.end()) {
6596 guard.destination(),
6603 if (tailLen < numElements) {
6605 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> endGuard(destBegin,
6610 while (toEnd != destBegin) {
6616 endGuard.moveBegin(-1);
6623#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 3
6624template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
6628 TARGET_TYPE *toBegin,
6630 ALLOCATOR allocator,
6644 size_type numGuarded = tailLen < numElements ? tailLen : numElements;
6647 TARGET_TYPE *destBegin = toBegin + numElements;
6649 std::memmove((
void *)destBegin,
6651 tailLen *
sizeof(TARGET_TYPE));
6655 TARGET_TYPE *destEnd = toEnd + numElements;
6657 AutoArrayMoveDestructor<TARGET_TYPE, ALLOCATOR> guard(toBegin,
6658 destEnd - numGuarded,
6659 destEnd - numGuarded,
6663 while (guard.middle() != guard.end()) {
6665 guard.destination(),
6673 if (tailLen < numElements) {
6675 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> endGuard(destBegin,
6680 while (toEnd != destBegin) {
6687 endGuard.moveBegin(-1);
6694#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 4
6695template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
6700 TARGET_TYPE *toBegin,
6702 ALLOCATOR allocator,
6717 size_type numGuarded = tailLen < numElements ? tailLen : numElements;
6720 TARGET_TYPE *destBegin = toBegin + numElements;
6722 std::memmove((
void *)destBegin,
6724 tailLen *
sizeof(TARGET_TYPE));
6728 TARGET_TYPE *destEnd = toEnd + numElements;
6730 AutoArrayMoveDestructor<TARGET_TYPE, ALLOCATOR> guard(toBegin,
6731 destEnd - numGuarded,
6732 destEnd - numGuarded,
6736 while (guard.middle() != guard.end()) {
6738 guard.destination(),
6747 if (tailLen < numElements) {
6749 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> endGuard(destBegin,
6754 while (toEnd != destBegin) {
6762 endGuard.moveBegin(-1);
6769#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 5
6770template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
6776 TARGET_TYPE *toBegin,
6778 ALLOCATOR allocator,
6794 size_type numGuarded = tailLen < numElements ? tailLen : numElements;
6797 TARGET_TYPE *destBegin = toBegin + numElements;
6799 std::memmove((
void *)destBegin,
6801 tailLen *
sizeof(TARGET_TYPE));
6805 TARGET_TYPE *destEnd = toEnd + numElements;
6807 AutoArrayMoveDestructor<TARGET_TYPE, ALLOCATOR> guard(toBegin,
6808 destEnd - numGuarded,
6809 destEnd - numGuarded,
6813 while (guard.middle() != guard.end()) {
6815 guard.destination(),
6825 if (tailLen < numElements) {
6827 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> endGuard(destBegin,
6832 while (toEnd != destBegin) {
6841 endGuard.moveBegin(-1);
6848#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 6
6849template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
6856 TARGET_TYPE *toBegin,
6858 ALLOCATOR allocator,
6875 size_type numGuarded = tailLen < numElements ? tailLen : numElements;
6878 TARGET_TYPE *destBegin = toBegin + numElements;
6880 std::memmove((
void *)destBegin,
6882 tailLen *
sizeof(TARGET_TYPE));
6886 TARGET_TYPE *destEnd = toEnd + numElements;
6888 AutoArrayMoveDestructor<TARGET_TYPE, ALLOCATOR> guard(toBegin,
6889 destEnd - numGuarded,
6890 destEnd - numGuarded,
6894 while (guard.middle() != guard.end()) {
6896 guard.destination(),
6907 if (tailLen < numElements) {
6909 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> endGuard(destBegin,
6914 while (toEnd != destBegin) {
6924 endGuard.moveBegin(-1);
6931#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 7
6932template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
6940 TARGET_TYPE *toBegin,
6942 ALLOCATOR allocator,
6960 size_type numGuarded = tailLen < numElements ? tailLen : numElements;
6963 TARGET_TYPE *destBegin = toBegin + numElements;
6965 std::memmove((
void *)destBegin,
6967 tailLen *
sizeof(TARGET_TYPE));
6971 TARGET_TYPE *destEnd = toEnd + numElements;
6973 AutoArrayMoveDestructor<TARGET_TYPE, ALLOCATOR> guard(toBegin,
6974 destEnd - numGuarded,
6975 destEnd - numGuarded,
6979 while (guard.middle() != guard.end()) {
6981 guard.destination(),
6993 if (tailLen < numElements) {
6995 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> endGuard(destBegin,
7000 while (toEnd != destBegin) {
7011 endGuard.moveBegin(-1);
7018#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 8
7019template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
7028 TARGET_TYPE *toBegin,
7030 ALLOCATOR allocator,
7049 size_type numGuarded = tailLen < numElements ? tailLen : numElements;
7052 TARGET_TYPE *destBegin = toBegin + numElements;
7054 std::memmove((
void *)destBegin,
7056 tailLen *
sizeof(TARGET_TYPE));
7060 TARGET_TYPE *destEnd = toEnd + numElements;
7062 AutoArrayMoveDestructor<TARGET_TYPE, ALLOCATOR> guard(toBegin,
7063 destEnd - numGuarded,
7064 destEnd - numGuarded,
7068 while (guard.middle() != guard.end()) {
7070 guard.destination(),
7083 if (tailLen < numElements) {
7085 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> endGuard(destBegin,
7090 while (toEnd != destBegin) {
7102 endGuard.moveBegin(-1);
7109#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 9
7110template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
7120 TARGET_TYPE *toBegin,
7122 ALLOCATOR allocator,
7142 size_type numGuarded = tailLen < numElements ? tailLen : numElements;
7145 TARGET_TYPE *destBegin = toBegin + numElements;
7147 std::memmove((
void *)destBegin,
7149 tailLen *
sizeof(TARGET_TYPE));
7153 TARGET_TYPE *destEnd = toEnd + numElements;
7155 AutoArrayMoveDestructor<TARGET_TYPE, ALLOCATOR> guard(toBegin,
7156 destEnd - numGuarded,
7157 destEnd - numGuarded,
7161 while (guard.middle() != guard.end()) {
7163 guard.destination(),
7177 if (tailLen < numElements) {
7179 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> endGuard(destBegin,
7184 while (toEnd != destBegin) {
7197 endGuard.moveBegin(-1);
7204#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 10
7205template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
7216 TARGET_TYPE *toBegin,
7218 ALLOCATOR allocator,
7239 size_type numGuarded = tailLen < numElements ? tailLen : numElements;
7242 TARGET_TYPE *destBegin = toBegin + numElements;
7244 std::memmove((
void *)destBegin,
7246 tailLen *
sizeof(TARGET_TYPE));
7250 TARGET_TYPE *destEnd = toEnd + numElements;
7252 AutoArrayMoveDestructor<TARGET_TYPE, ALLOCATOR> guard(toBegin,
7253 destEnd - numGuarded,
7254 destEnd - numGuarded,
7258 while (guard.middle() != guard.end()) {
7260 guard.destination(),
7275 if (tailLen < numElements) {
7277 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> endGuard(destBegin,
7282 while (toEnd != destBegin) {
7296 endGuard.moveBegin(-1);
7304#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 0
7305template <
class TARGET_TYPE,
class ALLOCATOR>
7307 TARGET_TYPE *toBegin,
7309 ALLOCATOR allocator,
7317 if (toEnd > toBegin) {
7332 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toEnd,
7337 TARGET_TYPE *destEnd = toEnd;
7338 TARGET_TYPE *srcEnd = toEnd - 1;
7339 while (toBegin != srcEnd) {
7356#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 1
7357template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01>
7359 TARGET_TYPE *toBegin,
7361 ALLOCATOR allocator,
7370 if (toEnd > toBegin) {
7386 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toEnd,
7391 TARGET_TYPE *destEnd = toEnd;
7392 TARGET_TYPE *srcEnd = toEnd - 1;
7393 while (toBegin != srcEnd) {
7410#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 2
7411template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
7414 TARGET_TYPE *toBegin,
7416 ALLOCATOR allocator,
7426 if (toEnd > toBegin) {
7443 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toEnd,
7448 TARGET_TYPE *destEnd = toEnd;
7449 TARGET_TYPE *srcEnd = toEnd - 1;
7450 while (toBegin != srcEnd) {
7468#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 3
7469template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
7473 TARGET_TYPE *toBegin,
7475 ALLOCATOR allocator,
7486 if (toEnd > toBegin) {
7504 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toEnd,
7509 TARGET_TYPE *destEnd = toEnd;
7510 TARGET_TYPE *srcEnd = toEnd - 1;
7511 while (toBegin != srcEnd) {
7530#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 4
7531template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
7536 TARGET_TYPE *toBegin,
7538 ALLOCATOR allocator,
7550 if (toEnd > toBegin) {
7569 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toEnd,
7574 TARGET_TYPE *destEnd = toEnd;
7575 TARGET_TYPE *srcEnd = toEnd - 1;
7576 while (toBegin != srcEnd) {
7596#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 5
7597template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
7603 TARGET_TYPE *toBegin,
7605 ALLOCATOR allocator,
7618 if (toEnd > toBegin) {
7638 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toEnd,
7643 TARGET_TYPE *destEnd = toEnd;
7644 TARGET_TYPE *srcEnd = toEnd - 1;
7645 while (toBegin != srcEnd) {
7666#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 6
7667template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
7674 TARGET_TYPE *toBegin,
7676 ALLOCATOR allocator,
7690 if (toEnd > toBegin) {
7711 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toEnd,
7716 TARGET_TYPE *destEnd = toEnd;
7717 TARGET_TYPE *srcEnd = toEnd - 1;
7718 while (toBegin != srcEnd) {
7740#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 7
7741template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
7749 TARGET_TYPE *toBegin,
7751 ALLOCATOR allocator,
7766 if (toEnd > toBegin) {
7788 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toEnd,
7793 TARGET_TYPE *destEnd = toEnd;
7794 TARGET_TYPE *srcEnd = toEnd - 1;
7795 while (toBegin != srcEnd) {
7818#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 8
7819template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
7828 TARGET_TYPE *toBegin,
7830 ALLOCATOR allocator,
7846 if (toEnd > toBegin) {
7869 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toEnd,
7874 TARGET_TYPE *destEnd = toEnd;
7875 TARGET_TYPE *srcEnd = toEnd - 1;
7876 while (toBegin != srcEnd) {
7900#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 9
7901template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
7911 TARGET_TYPE *toBegin,
7913 ALLOCATOR allocator,
7930 if (toEnd > toBegin) {
7954 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toEnd,
7959 TARGET_TYPE *destEnd = toEnd;
7960 TARGET_TYPE *srcEnd = toEnd - 1;
7961 while (toBegin != srcEnd) {
7986#if BSLALG_ARRAYPRIMITIVES_VARIADIC_LIMIT_F >= 10
7987template <
class TARGET_TYPE,
class ALLOCATOR,
class ARGS_01,
7998 TARGET_TYPE *toBegin,
8000 ALLOCATOR allocator,
8018 if (toEnd > toBegin) {
8043 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toEnd,
8048 TARGET_TYPE *destEnd = toEnd;
8049 TARGET_TYPE *srcEnd = toEnd - 1;
8050 while (toBegin != srcEnd) {
8079template <
class TARGET_TYPE,
class ALLOCATOR,
class... ARGS>
8082 TARGET_TYPE *toBegin,
8084 ALLOCATOR allocator,
8097template <
class TARGET_TYPE,
class ALLOCATOR,
class... ARGS>
8099 TARGET_TYPE *toBegin,
8101 ALLOCATOR allocator,
8113 size_type numGuarded = tailLen < numElements ? tailLen : numElements;
8116 TARGET_TYPE *destBegin = toBegin + numElements;
8118 std::memmove((
void *)destBegin,
8120 tailLen *
sizeof(TARGET_TYPE));
8124 TARGET_TYPE *destEnd = toEnd + numElements;
8126 AutoArrayMoveDestructor<TARGET_TYPE, ALLOCATOR> guard(toBegin,
8127 destEnd - numGuarded,
8128 destEnd - numGuarded,
8132 while (guard.middle() != guard.end()) {
8134 guard.destination(),
8140 if (tailLen < numElements) {
8142 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> endGuard(destBegin,
8147 while (toEnd != destBegin) {
8152 endGuard.moveBegin(-1);
8158template <
class TARGET_TYPE,
class ALLOCATOR,
class... ARGS>
8160 TARGET_TYPE *toBegin,
8162 ALLOCATOR allocator,
8171 if (toEnd > toBegin) {
8187 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toEnd,
8192 TARGET_TYPE *destEnd = toEnd;
8193 TARGET_TYPE *srcEnd = toEnd - 1;
8194 while (toBegin != srcEnd) {
8214template <
class TARGET_TYPE,
class ALLOCATOR>
8217 TARGET_TYPE *middle,
8219 ALLOCATOR allocator,
8240 size_type numBytes =
reinterpret_cast<const char *
>(last)
8241 -
reinterpret_cast<const char *
>(middle);
8243 std::memmove((
void *)first, middle, numBytes);
8247template <
class TARGET_TYPE,
class ALLOCATOR>
8250 TARGET_TYPE *middle,
8252 ALLOCATOR allocator,
8269 while (middle != last) {
8282template <
class TARGET_TYPE,
class ALLOCATOR>
8285 TARGET_TYPE *toBegin,
8287 const TARGET_TYPE& value,
8289 ALLOCATOR allocator,
8309 if (toBegin <= tempValuePtr && tempValuePtr < toEnd ) {
8312 tempValuePtr += numElements;
8319 const size_type numBytes =
reinterpret_cast<const char*
>(toEnd)
8320 -
reinterpret_cast<const char*
>(toBegin);
8322 std::memmove((
void *)(toBegin + numElements), toBegin, numBytes);
8340 bitwiseFillN(
reinterpret_cast<char *
>(toBegin),
8342 numElements *
sizeof value);
8345template <
class TARGET_TYPE,
class ALLOCATOR>
8347 TARGET_TYPE *toBegin,
8349 const TARGET_TYPE& value,
8351 ALLOCATOR allocator,
8368 if (toBegin <= tempValuePtr && tempValuePtr < toEnd + numElements) {
8371 tempValuePtr += numElements;
8375 size_type numGuarded = tailLen < numElements ? tailLen : numElements;
8381 TARGET_TYPE *destBegin = toBegin + numElements;
8383 std::memmove((
void *)destBegin,
8385 tailLen *
sizeof(TARGET_TYPE));
8392 TARGET_TYPE *destEnd = toEnd + numElements;
8394 AutoArrayMoveDestructor<TARGET_TYPE, ALLOCATOR> guard(toBegin,
8395 destEnd - numGuarded,
8396 destEnd - numGuarded,
8400 while (guard.middle() != guard.end()) {
8402 guard.destination(),
8410 if (tailLen < numElements) {
8416 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> endGuard(destBegin,
8424 while (toEnd != destBegin) {
8429 endGuard.moveBegin(-1);
8435template <
class TARGET_TYPE,
class ALLOCATOR>
8437 TARGET_TYPE *toBegin,
8439 const TARGET_TYPE& value,
8441 ALLOCATOR allocator,
8470 const size_type tailLen = toEnd - toBegin;
8471 if (tailLen >= numElements) {
8478 moveIfNoexcept(toEnd,
8479 toEnd - numElements,
8484 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toEnd,
8485 toEnd + numElements,
8498 TARGET_TYPE *src = toEnd - numElements;
8499 TARGET_TYPE *dest = toEnd;
8500 while (toBegin != src) {
8508 for ( ; toBegin != dest; ++toBegin) {
8509 *toBegin = space.
object();
8531 moveIfNoexcept(toBegin + numElements,
8537 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toEnd + remElements,
8538 toEnd + numElements,
8550 guard.moveBegin(-remElements);
8556 for ( ; toBegin != toEnd; ++toBegin) {
8557 *toBegin = space.
object();
8567template <
class TARGET_TYPE,
class FWD_ITER,
class SENTINEL,
class ALLOCATOR>
8570 TARGET_TYPE *toBegin,
8575 ALLOCATOR allocator,
8583#if defined(BSLALG_ARRAYPRIMITIVES_CANNOT_REMOVE_POINTER_FROM_FUNCTION_POINTER)
8585 insert((
void * *)toBegin,
8587 (
void *
const *)fromBegin,
8588 (
void *
const *)fromEnd,
8601 reinterpret_cast<void * *
>(
const_cast<NcPtrType **
>(toBegin)),
8602 reinterpret_cast<void * *
>(
const_cast<NcPtrType **
>(toEnd)),
8603 reinterpret_cast<void *
const *
>(
const_cast<NcIter *
const *
>(fromBegin)),
8604 reinterpret_cast<void *
const *
>(
const_cast<NcIter *
const *
>(fromEnd)),
8611template <
class TARGET_TYPE,
class ALLOCATOR>
8614 TARGET_TYPE *toBegin,
8616 const TARGET_TYPE *fromBegin,
8617 const TARGET_TYPE *fromEnd,
8646 const size_type numBytes =
reinterpret_cast<const char*
>(toEnd)
8647 -
reinterpret_cast<const char*
>(toBegin);
8649 std::memmove((
void *)(toBegin + numElements), toBegin, numBytes);
8657 std::memcpy((
void *)toBegin,
8659 numElements *
sizeof(TARGET_TYPE));
8663template <
class TARGET_TYPE,
class FWD_ITER,
class SENTINEL,
class ALLOCATOR>
8665 TARGET_TYPE *toBegin,
8670 ALLOCATOR allocator,
8677 if (0 == numElements) {
8699 const size_type tailLen = toEnd - toBegin;
8700 const size_type numGuarded = tailLen < numElements ? tailLen : numElements;
8706 TARGET_TYPE *destBegin = toBegin + numElements;
8708 std::memmove((
void *)destBegin,
8710 tailLen *
sizeof(TARGET_TYPE));
8717 TARGET_TYPE *destEnd = toEnd + numElements;
8719 AutoArrayMoveDestructor<TARGET_TYPE, ALLOCATOR> guard(toBegin,
8720 destEnd - numGuarded,
8721 destEnd - numGuarded,
8725 for (; guard.middle() != guard.end(); ++fromBegin) {
8727 guard.destination(),
8735 if (tailLen < numElements) {
8741 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> endGuard1(toEnd,
8744 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> endGuard2(destBegin,
8752 for (; toEnd != destBegin; ++fromBegin) {
8756 toEnd = endGuard1.moveEnd(1);
8758 endGuard1.release();
8759 endGuard2.release();
8763template <
class TARGET_TYPE,
class FWD_ITER,
class SENTINEL,
class ALLOCATOR>
8765 TARGET_TYPE *toBegin,
8770 ALLOCATOR allocator,
8776 if (0 == numElements) {
8788 const size_type tailLen = toEnd - toBegin;
8789 if (tailLen > numElements) {
8796 moveIfNoexcept(toEnd,
8797 toEnd - numElements,
8802 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toEnd,
8803 toEnd + numElements,
8810 TARGET_TYPE *src = toEnd - numElements;
8811 TARGET_TYPE *dest = toEnd;
8812 while (toBegin != src) {
8820 for (; toBegin != dest; ++toBegin, ++fromBegin) {
8821 *toBegin = *fromBegin;
8835 moveIfNoexcept(toBegin + numElements,
8841 AutoArrayDestructor<TARGET_TYPE, ALLOCATOR> guard(toEnd + remElements,
8842 toEnd + numElements,
8849 for (; toBegin != toEnd; ++fromBegin, ++toBegin) {
8850 *toBegin = *fromBegin;
8866template <
class FWD_ITER,
class SENTINEL,
class ALLOCATOR>
8886 if (0 == numElements) {
8908 const size_type tailLen = toEnd - toBegin;
8914 void **destBegin = toBegin + numElements;
8917 std::memmove(destBegin, toBegin, tailLen *
sizeof(
void **));
8920 for (
size_type i = 0; i < numElements; ++i) {
8921 *toBegin =
reinterpret_cast<void *
>(*fromBegin);
8930template <
class TARGET_TYPE,
class ALLOCATOR>
8933 TARGET_TYPE *toBegin,
8935 TARGET_TYPE **lastPtr,
8939 ALLOCATOR allocator,
8951 insert(toBegin, toEnd, first, last, numElements, allocator,
8956template <
class TARGET_TYPE,
class ALLOCATOR>
8959 TARGET_TYPE *toBegin,
8961 TARGET_TYPE **lastPtr,
8965 ALLOCATOR allocator,
8978 insert(toBegin, toEnd, first, last, numElements, allocator,
8986template <
class TARGET_TYPE>
8990 TARGET_TYPE *middle,
8997 bitwiseRotate(
reinterpret_cast<char *
>(begin),
8998 reinterpret_cast<char *
>(middle),
8999 reinterpret_cast<char *
>(end));
9002template <
class TARGET_TYPE>
9005 TARGET_TYPE *middle,
9012 if (begin == middle || middle == end) {
9021 const std::size_t numElements = middle -
begin;
9022 const std::size_t remElements =
end - middle;
9024 if (numElements == remElements) {
9025 for (; middle !=
end; ++
begin, ++middle) {
9026 TARGET_TYPE tmp(*middle);
9038 std::size_t numCycles =
end -
begin;
9039 std::size_t remainder = numElements;
9040 while (remainder != 0) {
9041 std::size_t t = numCycles % remainder;
9042 numCycles = remainder;
9053 for (std::size_t i = 0; i < numCycles; ++i) {
9058 TARGET_TYPE *ptr =
begin;
9059 TARGET_TYPE tmp = *ptr;
9061 if (numElements < remElements) {
9079 std::size_t cycleSize = remElements / numCycles;
9081 for (std::size_t j = 0; j < cycleSize; ++j) {
9082 if (ptr > begin + remElements) {
9086 *ptr = *(ptr - remElements);
9090 *ptr = *(ptr + numElements);
9114 std::size_t cycleSize = numElements / numCycles - 1;
9116 for (std::size_t j = 0; j < cycleSize; ++j) {
9117 if (ptr < end - numElements) {
9118 *ptr = *(ptr + numElements);
9122 *ptr = *(ptr - remElements);
9141template <
class ALLOCATOR>
9148 ALLOCATOR allocator,
9159 ValueType *valuePtr =
9161 if (begin <= valuePtr && valuePtr < end) {
9165#if defined(BSLS_PLATFORM_PRAGMA_GCC_DIAGNOSTIC_GCC)
9167#pragma GCC diagnostic push
9168#pragma GCC diagnostic ignored "-Wclass-memaccess"
9172 std::memmove(
static_cast<void *
>(begin + 1),
9174 (end - begin) *
sizeof(ValueType));
9182#if defined(BSLS_PLATFORM_PRAGMA_GCC_DIAGNOSTIC_GCC)
9183#pragma GCC diagnostic pop
9187template <
class ALLOCATOR>
9194 ALLOCATOR allocator,
9205 ValueType *valuePtr =
9207 if (begin <= valuePtr && valuePtr < end) {
9212 size_t bytesNum = (
end -
begin) *
sizeof(ValueType);
9215#if defined(BSLS_PLATFORM_PRAGMA_GCC_DIAGNOSTIC_GCC)
9217#pragma GCC diagnostic push
9218#pragma GCC diagnostic ignored "-Wclass-memaccess"
9221 std::memmove(
static_cast<void *
>(begin + 1), begin, bytesNum);
9227 class ElementsProctor {
9234 ElementsProctor(ValueType *p,
size_t n) : d_begin(p), d_bytesNum(n) {}
9237 if(d_bytesNum) std::memmove(
static_cast<void *
>(d_begin),
9242 void release() { d_bytesNum = 0; }
9243 } proctor(begin, bytesNum);
9252#if defined(BSLS_PLATFORM_PRAGMA_GCC_DIAGNOSTIC_GCC)
9253#pragma GCC diagnostic pop
9257template <
class ALLOCATOR>
9264 ALLOCATOR allocator,
9275 ValueType *valuePtr =
9277 if (begin <= valuePtr && valuePtr < end) {
9300 end, end + 1, allocator);
9306 ValueType *dst =
end;
9307 ValueType *src =
end - 1;
9308 while (src != begin) {
9323#ifndef BDE_OPENSOURCE_PUBLICATION
9334#if defined(BSLALG_ARRAYPRIMITIVES_CANNOT_REMOVE_POINTER_FROM_FUNCTION_POINTER)
9335# undef BSLALG_ARRAYPRIMITIVES_CANNOT_REMOVE_POINTER_FROM_FUNCTION_POINTER
9339# error Not valid except when included from bslalg_arrayprimitives.h
Definition bslalg_autoarraydestructor.h:232
Definition bslma_allocator.h:545
Definition bslma_destructorproctor.h:259
Definition bslmf_movableref.h:752
bslalg::ArrayPrimitives bslalg_ArrayPrimitives
This alias is defined for backward compatibility.
Definition bslalg_arrayprimitives.h:5061
#define BSLMF_ASSERT(expr)
Definition bslmf_assert.h:231
static const bool value
Definition bslmf_integralconstant.h:267
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1917
#define BSLS_COMPILERFEATURES_FORWARD_REF(T)
Definition bsls_compilerfeatures.h:2343
#define BSLS_COMPILERFEATURES_FORWARD(T, V)
Definition bsls_compilerfeatures.h:2349
#define BSLS_UTIL_ADDRESSOF(OBJ)
Definition bsls_util.h:296
T::iterator begin(T &container)
Definition bslstl_iterator.h:1593
T::iterator end(T &container)
Definition bslstl_iterator.h:1621
Definition bdlc_flathashmap.h:2218
static void construct(ALLOCATOR_TYPE &basicAllocator, ELEMENT_TYPE *elementAddr, Args &&... arguments)
Definition bslma_allocatortraits.h:1527
BloombergLP::bslma::AllocatorTraits_PointerType< ALLOCATOR_TYPE >::type pointer
Definition bslma_allocatortraits.h:1180
ALLOCATOR_TYPE::value_type value_type
Definition bslma_allocatortraits.h:1176
Definition bslmf_integralconstant.h:261
Definition bslmf_isenum.h:272
Definition bslmf_isfundamental.h:330
Definition bslmf_ismemberpointer.h:143
Definition bslmf_ispointer.h:138
Definition bslmf_issame.h:146
Definition bslmf_istriviallydefaultconstructible.h:296
Definition bslmf_isvoid.h:138
Definition bslmf_removecv.h:120
Definition bslmf_removepointer.h:262
BloombergLP::bslmf::RemovePointer_Imp< t_TYPE >::Type type
Definition bslmf_removepointer.h:274
static void destroy(TARGET_TYPE *begin, TARGET_TYPE *end, ALLOCATOR allocator, bsl::true_type)
Definition bslalg_arraydestructionprimitives.h:238
static void emplace(TARGET_TYPE *toBegin, TARGET_TYPE *toEnd, ALLOCATOR allocator, bsl::integral_constant< int, e_BITWISE_COPYABLE_TRAITS >, ARGS &&... args)
TBD: document this.
Definition bslalg_arrayprimitives.h:3762
static void moveConstruct(TARGET_TYPE *toBegin, TARGET_TYPE *fromBegin, TARGET_TYPE *fromEnd, ALLOCATOR allocator, bsl::integral_constant< int, e_BITWISE_COPYABLE_TRAITS >)
Definition bslalg_arrayprimitives.h:3584
static void bitwiseRotateBackward(char *begin, char *middle, char *end)
static void bitwiseRotate(char *begin, char *middle, char *end)
static void shiftAndInsert(typename bsl::allocator_traits< ALLOCATOR >::pointer begin, typename bsl::allocator_traits< ALLOCATOR >::pointer end, bslmf::MovableRef< typename bsl::allocator_traits< ALLOCATOR >::value_type > value, ALLOCATOR allocator, bsl::integral_constant< int, e_BITWISE_COPYABLE_TRAITS >)
Definition bslalg_arrayprimitives.h:4875
@ k_INPLACE_BUFFER_SIZE
Definition bslalg_arrayprimitives.h:1298
static void bitwiseFillN(char *begin, size_type numBytesInitialized, size_type numBytes)
static void bitwiseSwapRanges(char *begin, char *middle, char *end)
static void uninitializedFillN(bool *begin, bool value, size_type numElements, void *=0, bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >=bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >())
Definition bslalg_arrayprimitives.h:3128
static void moveInsert(TARGET_TYPE *toBegin, TARGET_TYPE *toEnd, TARGET_TYPE **lastPtr, TARGET_TYPE *first, TARGET_TYPE *last, size_type numElements, ALLOCATOR allocator, bsl::integral_constant< int, e_BITWISE_MOVEABLE_TRAITS >)
Definition bslalg_arrayprimitives.h:4664
static void moveIfNoexcept(TARGET_TYPE *toBegin, TARGET_TYPE *fromBegin, TARGET_TYPE *fromEnd, ALLOCATOR allocator, bsl::integral_constant< int, e_NIL_TRAITS >)
Definition bslalg_arrayprimitives.h:3629
ArrayPrimitives::difference_type difference_type
Definition bslalg_arrayprimitives.h:1277
static void bitwiseRotateForward(char *begin, char *middle, char *end)
@ e_BITWISE_MOVEABLE_TRAITS
Definition bslalg_arrayprimitives.h:1290
@ e_HAS_TRIVIAL_DEFAULT_CTOR_TRAITS
Definition bslalg_arrayprimitives.h:1288
@ e_NIL_TRAITS
Definition bslalg_arrayprimitives.h:1291
@ e_BITWISE_COPYABLE_TRAITS
Definition bslalg_arrayprimitives.h:1289
@ e_IS_FUNDAMENTAL_OR_POINTER
Definition bslalg_arrayprimitives.h:1287
@ e_IS_ITERATOR_TO_FUNCTION_POINTER
Definition bslalg_arrayprimitives.h:1285
@ e_IS_POINTER_TO_POINTER
Definition bslalg_arrayprimitives.h:1286
ArrayPrimitives::size_type size_type
Definition bslalg_arrayprimitives.h:1276
static bool isInvalidRange(FORWARD_ITERATOR begin, SENTINEL end)
Definition bslalg_arrayprimitives.h:3092
static void destructiveMove(TARGET_TYPE *toBegin, TARGET_TYPE *fromBegin, TARGET_TYPE *fromEnd, ALLOCATOR allocator, bsl::integral_constant< int, e_BITWISE_MOVEABLE_TRAITS >)
Definition bslalg_arrayprimitives.h:3718
static void erase(TARGET_TYPE *first, TARGET_TYPE *middle, TARGET_TYPE *last, ALLOCATOR allocator, bsl::integral_constant< int, e_BITWISE_MOVEABLE_TRAITS >)
Definition bslalg_arrayprimitives.h:3947
static void rotate(TARGET_TYPE *begin, TARGET_TYPE *middle, TARGET_TYPE *end, bsl::integral_constant< int, e_BITWISE_MOVEABLE_TRAITS >)
Definition bslalg_arrayprimitives.h:4720
static void insert(TARGET_TYPE *toBegin, TARGET_TYPE *toEnd, const TARGET_TYPE &value, size_type numElements, ALLOCATOR allocator, bsl::integral_constant< int, e_BITWISE_COPYABLE_TRAITS >)
Definition bslalg_arrayprimitives.h:4016
static void copyConstruct(TARGET_TYPE *toBegin, FWD_ITER fromBegin, SENTINEL fromEnd, ALLOCATOR allocator, bsl::integral_constant< int, e_IS_POINTER_TO_POINTER >)
Definition bslalg_arrayprimitives.h:3471
static void defaultConstruct(TARGET_TYPE *begin, size_type numElements, ALLOCATOR allocator, bsl::integral_constant< int, e_HAS_TRIVIAL_DEFAULT_CTOR_TRAITS >)
Definition bslalg_arrayprimitives.h:3659
Definition bslalg_arrayprimitives.h:424
static void destructiveMoveAndMoveInsert(typename bsl::allocator_traits< ALLOCATOR >::pointer toBegin, typename bsl::allocator_traits< ALLOCATOR >::pointer *fromEndPtr, typename bsl::allocator_traits< ALLOCATOR >::pointer *lastPtr, typename bsl::allocator_traits< ALLOCATOR >::pointer fromBegin, typename bsl::allocator_traits< ALLOCATOR >::pointer position, typename bsl::allocator_traits< ALLOCATOR >::pointer fromEnd, typename bsl::allocator_traits< ALLOCATOR >::pointer first, typename bsl::allocator_traits< ALLOCATOR >::pointer last, size_type numElements, ALLOCATOR allocator)
Definition bslalg_arrayprimitives.h:2553
static void destructiveMoveAndEmplace(typename bsl::allocator_traits< ALLOCATOR >::pointer toBegin, typename bsl::allocator_traits< ALLOCATOR >::pointer *fromEndPtr, typename bsl::allocator_traits< ALLOCATOR >::pointer fromBegin, typename bsl::allocator_traits< ALLOCATOR >::pointer position, typename bsl::allocator_traits< ALLOCATOR >::pointer fromEnd, ALLOCATOR allocator, ARGS &&... arguments)
Definition bslalg_arrayprimitives.h:2211
ArrayPrimitives_Imp Imp
Definition bslalg_arrayprimitives.h:428
static void insert(typename bsl::allocator_traits< ALLOCATOR >::pointer toBegin, typename bsl::allocator_traits< ALLOCATOR >::pointer toEnd, bslmf::MovableRef< typename bsl::allocator_traits< ALLOCATOR >::value_type > value, ALLOCATOR allocator)
Definition bslalg_arrayprimitives.h:2745
static void destructiveMove(typename bsl::allocator_traits< ALLOCATOR >::pointer toBegin, typename bsl::allocator_traits< ALLOCATOR >::pointer fromBegin, typename bsl::allocator_traits< ALLOCATOR >::pointer fromEnd, ALLOCATOR allocator)
Definition bslalg_arrayprimitives.h:2172
static void defaultConstruct(typename bsl::allocator_traits< ALLOCATOR >::pointer begin, size_type numElements, ALLOCATOR allocator)
Definition bslalg_arrayprimitives.h:2129
static void moveInsert(typename bsl::allocator_traits< ALLOCATOR >::pointer toBegin, typename bsl::allocator_traits< ALLOCATOR >::pointer toEnd, typename bsl::allocator_traits< ALLOCATOR >::pointer *fromEndPtr, typename bsl::allocator_traits< ALLOCATOR >::pointer fromBegin, typename bsl::allocator_traits< ALLOCATOR >::pointer fromEnd, size_type numElements, ALLOCATOR allocator)
Definition bslalg_arrayprimitives.h:3007
static void copyConstruct(typename bsl::allocator_traits< ALLOCATOR >::pointer toBegin, FWD_ITER fromBegin, SENTINEL fromEnd, ALLOCATOR allocator)
Definition bslalg_arrayprimitives.h:2024
static void emplace(typename bsl::allocator_traits< ALLOCATOR >::pointer toBegin, typename bsl::allocator_traits< ALLOCATOR >::pointer toEnd, ALLOCATOR allocator, ARGS &&... arguments)
Definition bslalg_arrayprimitives.h:2656
static void moveConstruct(typename bsl::allocator_traits< ALLOCATOR >::pointer toBegin, typename bsl::allocator_traits< ALLOCATOR >::pointer fromBegin, typename bsl::allocator_traits< ALLOCATOR >::pointer fromEnd, ALLOCATOR allocator)
Definition bslalg_arrayprimitives.h:2969
static void destructiveMoveAndInsert(typename bsl::allocator_traits< ALLOCATOR >::pointer toBegin, typename bsl::allocator_traits< ALLOCATOR >::pointer *fromEndPtr, typename bsl::allocator_traits< ALLOCATOR >::pointer fromBegin, typename bsl::allocator_traits< ALLOCATOR >::pointer position, typename bsl::allocator_traits< ALLOCATOR >::pointer fromEnd, size_type numElements, ALLOCATOR allocator)
Definition bslalg_arrayprimitives.h:2282
std::ptrdiff_t difference_type
Definition bslalg_arrayprimitives.h:430
static void erase(typename bsl::allocator_traits< ALLOCATOR >::pointer first, typename bsl::allocator_traits< ALLOCATOR >::pointer middle, typename bsl::allocator_traits< ALLOCATOR >::pointer last, ALLOCATOR allocator)
Definition bslalg_arrayprimitives.h:2702
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:1970
std::size_t size_type
Definition bslalg_arrayprimitives.h:429
static void rotate(TARGET_TYPE *first, TARGET_TYPE *middle, TARGET_TYPE *last)
Definition bslalg_arrayprimitives.h:3054
static void construct(TARGET_TYPE *address, const ALLOCATOR &allocator)
Definition bslma_constructionutil.h:1244
static Allocator * allocator(Allocator *basicAllocator=0)
Definition bslma_default.h:913
Definition bslmf_isbitwisecopyable.h:298
Definition bslmf_isbitwisemoveable.h:718
Definition bslmf_functionpointertraits.h:163
static MovableRef< t_TYPE > move(t_TYPE &reference) BSLS_KEYWORD_NOEXCEPT
Definition bslmf_movableref.h:1067
static t_TYPE & access(t_TYPE &ref) BSLS_KEYWORD_NOEXCEPT
Definition bslmf_movableref.h:1039
static bsl::enable_if<!bsl::is_nothrow_move_constructible< t_TYPE >::value &&bsl::is_copy_constructible< t_TYPE >::value, constt_TYPE & >::type move_if_noexcept(t_TYPE &lvalue) BSLS_KEYWORD_NOEXCEPT
Definition bslmf_movableref.h:919
@ BSLS_MAX_ALIGNMENT
Definition bsls_alignmentutil.h:300
unsigned long long Uint64
Definition bsls_types.h:139
long long Int64
Definition bsls_types.h:134
Definition bsls_objectbuffer.h:277
TYPE & object()
Definition bsls_objectbuffer.h:352