8#ifndef INCLUDED_BSLALG_ARRAYPRIMITIVES
9#define INCLUDED_BSLALG_ARRAYPRIMITIVES
335#include <bslscm_version.h>
382#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
386#if BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
390# define COMPILING_BSLALG_ARRAYPRIMITIVES_H
392# undef COMPILING_BSLALG_ARRAYPRIMITIVES_H
395#if defined(BSLS_PLATFORM_CMP_IBM)
396# define BSLALG_ARRAYPRIMITIVES_CANNOT_REMOVE_POINTER_FROM_FUNCTION_POINTER 1
399# define BSLALG_ARRAYPRIMITIVES_NON_ZERO_NULL_VALUE_FOR_MEMBER_POINTERS 1
407struct ArrayPrimitives_Imp;
437 template <
class ALLOCATOR,
class FWD_ITER>
443 ALLOCATOR allocator);
444 template <
class ALLOCATOR,
class SOURCE_TYPE>
448 SOURCE_TYPE *fromBegin,
449 SOURCE_TYPE *fromEnd,
450 ALLOCATOR allocator);
463 template <
class TARGET_TYPE,
class FWD_ITER>
468 template <
class TARGET_TYPE,
class SOURCE_TYPE>
470 SOURCE_TYPE *fromBegin,
471 SOURCE_TYPE *fromEnd,
484 template <
class ALLOCATOR>
490 ALLOCATOR allocator);
502 template <
class TARGET_TYPE>
504 TARGET_TYPE *fromBegin,
505 TARGET_TYPE *fromEnd,
516 template <
class ALLOCATOR>
520 ALLOCATOR allocator);
533 template <
class TARGET_TYPE>
554 template <
class ALLOCATOR>
559 ALLOCATOR allocator);
573 template <
class TARGET_TYPE>
575 TARGET_TYPE *fromBegin,
576 TARGET_TYPE *fromEnd,
579#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
604 template <
class ALLOCATOR,
class... ARGS>
612 ARGS&&... arguments);
638 template <
class ALLOCATOR>
646 ALLOCATOR allocator);
670 template <
class TARGET_TYPE>
672 TARGET_TYPE **fromEndPtr,
673 TARGET_TYPE *fromBegin,
674 TARGET_TYPE *position,
675 TARGET_TYPE *fromEnd,
699 template <
class ALLOCATOR>
708 ALLOCATOR allocator);
726 template <
class TARGET_TYPE>
728 TARGET_TYPE **fromEndPtr,
729 TARGET_TYPE *fromBegin,
730 TARGET_TYPE *position,
731 TARGET_TYPE *fromEnd,
732 const TARGET_TYPE& value,
761 template <
class ALLOCATOR,
class FWD_ITER>
771 ALLOCATOR allocator);
792 template <
class TARGET_TYPE,
class FWD_ITER>
794 TARGET_TYPE **fromEndPtr,
795 TARGET_TYPE *fromBegin,
796 TARGET_TYPE *position,
797 TARGET_TYPE *fromEnd,
822 template <
class ALLOCATOR>
833 ALLOCATOR allocator);
856 template <
class TARGET_TYPE>
858 TARGET_TYPE **fromEndPtr,
859 TARGET_TYPE **lastPtr,
860 TARGET_TYPE *fromBegin,
861 TARGET_TYPE *position,
862 TARGET_TYPE *fromEnd,
868#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
885 template <
class ALLOCATOR,
class... ARGS>
890 ARGS&&... arguments);
907 template <
class TARGET_TYPE,
class... ARGS>
908 static void emplace(TARGET_TYPE *toBegin,
915#if defined(BSLS_PLATFORM_CMP_MSVC) && BSLS_PLATFORM_CMP_VERSION < 1900
916 template <
class CLASS_TYPE,
class MEMBER_TYPE,
class... ARGS>
917 static void emplace(MEMBER_TYPE CLASS_TYPE::* *toBegin,
918 MEMBER_TYPE CLASS_TYPE::* *toEnd,
919 bslma::Allocator *allocator)
923 emplace(toBegin, toEnd, allocator,
nullptr);
938 template <
class ALLOCATOR>
943 ALLOCATOR allocator);
954 template <
class TARGET_TYPE>
955 static void erase(TARGET_TYPE *first,
970 template <
class ALLOCATOR>
976 ALLOCATOR allocator);
988 template <
class TARGET_TYPE>
989 static void insert(TARGET_TYPE *toBegin,
1004 template <
class ALLOCATOR>
1011 ALLOCATOR allocator);
1024 template <
class TARGET_TYPE>
1025 static void insert(TARGET_TYPE *toBegin,
1027 const TARGET_TYPE& value,
1047 template <
class ALLOCATOR,
class FWD_ITER>
1054 ALLOCATOR allocator);
1055 template <
class ALLOCATOR,
class SOURCE_TYPE>
1059 SOURCE_TYPE *fromBegin,
1060 SOURCE_TYPE *fromEnd,
1062 ALLOCATOR allocator);
1080 template <
class TARGET_TYPE,
class FWD_ITER>
1081 static void insert(TARGET_TYPE *toBegin,
1087 template <
class TARGET_TYPE,
class SOURCE_TYPE>
1088 static void insert(TARGET_TYPE *toBegin,
1090 SOURCE_TYPE *fromBegin,
1091 SOURCE_TYPE *fromEnd,
1115 template <
class ALLOCATOR>
1123 ALLOCATOR allocator);
1144 template <
class TARGET_TYPE>
1147 TARGET_TYPE **fromEndPtr,
1148 TARGET_TYPE *fromBegin,
1149 TARGET_TYPE *fromEnd,
1163 template <
class TARGET_TYPE>
1164 static void rotate(TARGET_TYPE *first,
1165 TARGET_TYPE *middle,
1178 template <
class ALLOCATOR>
1183 ALLOCATOR allocator);
1198 template <
class TARGET_TYPE>
1201 const TARGET_TYPE& value,
1225 template <
class TARGET_TYPE>
1226 static void assign(TARGET_TYPE *srcStart,
1227 TARGET_TYPE *srcEnd,
1228 TARGET_TYPE& value);
1239 template <
class TARGET_TYPE>
1240 static void reverseAssign(TARGET_TYPE *dest,
1241 TARGET_TYPE *srcStart,
1242 TARGET_TYPE *srcEnd);
1299 unsigned char *begin,
1300 unsigned char value,
1327 unsigned short *begin,
1328 unsigned short value,
1341 unsigned int *begin,
1355 unsigned long *begin,
1356 unsigned long value,
1411 volatile void **begin,
1412 volatile void *value,
1425 const volatile void **begin,
1426 const volatile void *value,
1431 template <
class TARGET_TYPE>
1433 TARGET_TYPE **begin,
1439 template <
class TARGET_TYPE>
1441 const TARGET_TYPE **begin,
1442 const TARGET_TYPE *value,
1447 template <
class TARGET_TYPE>
1449 volatile TARGET_TYPE **begin,
1450 volatile TARGET_TYPE *value,
1455 template <
class TARGET_TYPE>
1457 const volatile TARGET_TYPE **begin,
1458 const volatile TARGET_TYPE *value,
1463 template <
class TARGET_TYPE,
class ALLOCATOR>
1466 const TARGET_TYPE& value,
1468 ALLOCATOR *allocator,
1470 template <
class TARGET_TYPE,
class ALLOCATOR>
1473 const TARGET_TYPE& value,
1475 ALLOCATOR *allocator,
1488 template <
class TARGET_TYPE,
class FWD_ITER,
class ALLOCATOR>
1490 TARGET_TYPE *toBegin,
1493 ALLOCATOR allocator,
1495 template <
class TARGET_TYPE,
class ALLOCATOR>
1497 TARGET_TYPE *toBegin,
1498 const TARGET_TYPE *fromBegin,
1499 const TARGET_TYPE *fromEnd,
1500 ALLOCATOR allocator,
1502 template <
class TARGET_TYPE,
class FWD_ITER,
class ALLOCATOR>
1504 TARGET_TYPE *toBegin,
1507 ALLOCATOR allocator,
1509 template <
class FWD_ITER,
class ALLOCATOR>
1514 ALLOCATOR allocator,
1516 template <
class TARGET_TYPE,
class FWD_ITER,
class ALLOCATOR>
1518 TARGET_TYPE *toBegin,
1521 ALLOCATOR allocator,
1536 template <
class TARGET_TYPE,
class ALLOCATOR>
1538 TARGET_TYPE *toBegin,
1539 TARGET_TYPE *fromBegin,
1540 TARGET_TYPE *fromEnd,
1541 ALLOCATOR allocator,
1543 template <
class TARGET_TYPE,
class ALLOCATOR>
1545 TARGET_TYPE *toBegin,
1546 TARGET_TYPE *fromBegin,
1547 TARGET_TYPE *fromEnd,
1548 ALLOCATOR allocator,
1566 template <
class TARGET_TYPE,
class ALLOCATOR>
1568 TARGET_TYPE *toBegin,
1569 TARGET_TYPE *fromBegin,
1570 TARGET_TYPE *fromEnd,
1571 ALLOCATOR allocator,
1581 template <
class TARGET_TYPE,
class ALLOCATOR>
1585 ALLOCATOR allocator,
1587 template <
class TARGET_TYPE,
class ALLOCATOR>
1591 ALLOCATOR allocator,
1593 template <
class TARGET_TYPE,
class ALLOCATOR>
1597 ALLOCATOR allocator,
1606 template <
class TARGET_TYPE,
class ALLOCATOR>
1608 TARGET_TYPE *toBegin,
1609 TARGET_TYPE *fromBegin,
1610 TARGET_TYPE *fromEnd,
1611 ALLOCATOR allocator,
1613 template <
class TARGET_TYPE,
class ALLOCATOR>
1615 TARGET_TYPE *toBegin,
1616 TARGET_TYPE *fromBegin,
1617 TARGET_TYPE *fromEnd,
1618 ALLOCATOR allocator,
1621#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
1623 template <
class TARGET_TYPE,
class ALLOCATOR,
class... ARGS>
1625 TARGET_TYPE *toBegin,
1627 ALLOCATOR allocator,
1630 template <
class TARGET_TYPE,
class ALLOCATOR,
class... ARGS>
1632 TARGET_TYPE *toBegin,
1634 ALLOCATOR allocator,
1637 template <
class TARGET_TYPE,
class ALLOCATOR,
class... ARGS>
1639 TARGET_TYPE *toBegin,
1641 ALLOCATOR allocator,
1652 template <
class TARGET_TYPE,
class ALLOCATOR>
1655 TARGET_TYPE *middle,
1657 ALLOCATOR allocator,
1659 template <
class TARGET_TYPE,
class ALLOCATOR>
1662 TARGET_TYPE *middle,
1664 ALLOCATOR allocator,
1674 template <
class TARGET_TYPE,
class ALLOCATOR>
1676 TARGET_TYPE *toBegin,
1678 const TARGET_TYPE& value,
1680 ALLOCATOR allocator,
1682 template <
class TARGET_TYPE,
class ALLOCATOR>
1684 TARGET_TYPE *toBegin,
1686 const TARGET_TYPE& value,
1688 ALLOCATOR allocator,
1690 template <
class TARGET_TYPE,
class ALLOCATOR>
1692 TARGET_TYPE *toBegin,
1694 const TARGET_TYPE& value,
1696 ALLOCATOR allocator,
1707 template <
class TARGET_TYPE,
class FWD_ITER,
class ALLOCATOR>
1709 TARGET_TYPE *toBegin,
1714 ALLOCATOR allocator,
1716 template <
class TARGET_TYPE,
class ALLOCATOR>
1718 TARGET_TYPE *toBegin,
1720 const TARGET_TYPE *fromBegin,
1721 const TARGET_TYPE *fromEnd,
1723 ALLOCATOR allocator,
1725 template <
class TARGET_TYPE,
class FWD_ITER,
class ALLOCATOR>
1727 TARGET_TYPE *toBegin,
1732 ALLOCATOR allocator,
1734 template <
class FWD_ITER,
class ALLOCATOR>
1741 ALLOCATOR allocator,
1743 template <
class TARGET_TYPE,
class FWD_ITER,
class ALLOCATOR>
1745 TARGET_TYPE *toBegin,
1750 ALLOCATOR allocator,
1756 template <
class TARGET_TYPE,
class ALLOCATOR>
1758 TARGET_TYPE *toBegin,
1760 TARGET_TYPE **lastPtr,
1764 ALLOCATOR allocator,
1766 template <
class TARGET_TYPE,
class ALLOCATOR>
1768 TARGET_TYPE *toBegin,
1770 TARGET_TYPE **lastPtr,
1774 ALLOCATOR allocator,
1783 template <
class TARGET_TYPE>
1786 TARGET_TYPE *middle,
1789 template <
class TARGET_TYPE>
1792 TARGET_TYPE *middle,
1801 template <
class ALLOCATOR>
1807 ALLOCATOR allocator,
1809 template <
class ALLOCATOR>
1815 ALLOCATOR allocator,
1817 template <
class ALLOCATOR>
1823 ALLOCATOR allocator,
1869 template <
class FORWARD_ITERATOR>
1870 static bool isInvalidRange(FORWARD_ITERATOR begin, FORWARD_ITERATOR end);
1871 template <
class TARGET_TYPE>
1872 static bool isInvalidRange(TARGET_TYPE *begin, TARGET_TYPE *end);
1886template <
class FROM_TYPE,
class TO_TYPE>
1890 typename bsl::remove_const<FROM_TYPE>::type,
1891 typename bsl::remove_const<TO_TYPE >::type>
1893 && bslmf::IsBitwiseCopyable<
1894 typename bsl::remove_const<TO_TYPE >::type>
1903template <
class ALLOCATOR>
1909 ALLOCATOR allocator)
1927 k_IS_FUNDAMENTAL_OR_POINTER = k_IS_FUNDAMENTAL ||
1928 (k_IS_POINTER && !k_IS_FUNCTION_POINTER),
1945template <
class TARGET_TYPE>
1949 const TARGET_TYPE& value,
1952 uninitializedFillN<bsl::allocator<TARGET_TYPE> >(begin,
1958template <
class ALLOCATOR,
class FWD_ITER>
1963 ALLOCATOR allocator)
1984 typedef typename FWD_ITER::value_type FwdTarget;
1995 k_VALUE = k_ITER_TO_FUNC_PTRS && k_TARGET_IS_VOID_PTR
2007template <
class TARGET_TYPE,
class FWD_ITER>
2014 copyConstruct<bsl::allocator<TARGET_TYPE> >(toBegin,
2020template <
class ALLOCATOR,
class SOURCE_TYPE>
2024 SOURCE_TYPE *fromBegin,
2025 SOURCE_TYPE *fromEnd,
2026 ALLOCATOR allocator)
2035 k_IS_BITWISECOPYABLE =
2049template <
class TARGET_TYPE,
class SOURCE_TYPE>
2052 SOURCE_TYPE *fromBegin,
2053 SOURCE_TYPE *fromEnd,
2056 copyConstruct<bsl::allocator<TARGET_TYPE> >(toBegin,
2062template <
class ALLOCATOR>
2067 ALLOCATOR allocator)
2078#if !defined(BSLALG_ARRAYPRIMITIVES_NON_ZERO_NULL_VALUE_FOR_MEMBER_POINTERS)
2094template <
class TARGET_TYPE>
2100 defaultConstruct<bsl::allocator<TARGET_TYPE> >(begin,
2105template <
class ALLOCATOR>
2111 ALLOCATOR allocator)
2131template <
class TARGET_TYPE>
2134 TARGET_TYPE *fromBegin,
2135 TARGET_TYPE *fromEnd,
2138 destructiveMove<bsl::allocator<TARGET_TYPE> >(toBegin,
2144#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
2145template <
class ALLOCATOR,
class... ARGS>
2152 ALLOCATOR allocator,
2153 ARGS&&... arguments)
2167 *fromEndPtr = fromEnd;
2175 TargetType *toPositionBegin = toBegin + (position - fromBegin);
2182 TargetType *toPositionEnd = toPositionBegin + 1;
2198 *fromEndPtr = position;
2199 guard.
moveEnd(fromEnd - position);
2211 *fromEndPtr = fromBegin;
2216template <
class ALLOCATOR>
2224 ALLOCATOR allocator)
2238 *fromEndPtr = fromEnd;
2246 TargetType *toPositionBegin = toBegin + (position - fromBegin);
2249 TargetType *toPositionEnd = toPositionBegin + numElements;
2265 *fromEndPtr = position;
2266 guard.
moveEnd(fromEnd - position);
2278 *fromEndPtr = fromBegin;
2282template <
class TARGET_TYPE>
2285 TARGET_TYPE *toBegin,
2286 TARGET_TYPE **fromEndPtr,
2287 TARGET_TYPE *fromBegin,
2288 TARGET_TYPE *position,
2289 TARGET_TYPE *fromEnd,
2293 destructiveMoveAndInsert<bsl::allocator<TARGET_TYPE> >(toBegin,
2302template <
class ALLOCATOR>
2311 ALLOCATOR allocator)
2325 *fromEndPtr = fromEnd;
2336 TargetType *toPositionBegin = toBegin + (position - fromBegin);
2339 TargetType *toPositionEnd = toPositionBegin + numElements;
2355 *fromEndPtr = position;
2356 guard.
moveEnd(fromEnd - position);
2368 *fromEndPtr = fromBegin;
2372template <
class TARGET_TYPE>
2374 TARGET_TYPE *toBegin,
2375 TARGET_TYPE **fromEndPtr,
2376 TARGET_TYPE *fromBegin,
2377 TARGET_TYPE *position,
2378 TARGET_TYPE *fromEnd,
2379 const TARGET_TYPE& value,
2383 destructiveMoveAndInsert<bsl::allocator<TARGET_TYPE> >(toBegin,
2393template <
class ALLOCATOR,
class FWD_ITER>
2403 ALLOCATOR allocator)
2417 *fromEndPtr = fromEnd;
2427 TargetType *toPositionBegin = toBegin + (position - fromBegin);
2430 TargetType *toPositionEnd = toPositionBegin + numElements;
2446 *fromEndPtr = position;
2447 guard.
moveEnd(fromEnd - position);
2459 *fromEndPtr = fromBegin;
2463template <
class TARGET_TYPE,
class FWD_ITER>
2466 TARGET_TYPE *toBegin,
2467 TARGET_TYPE **fromEndPtr,
2468 TARGET_TYPE *fromBegin,
2469 TARGET_TYPE *position,
2470 TARGET_TYPE *fromEnd,
2476 destructiveMoveAndInsert<bsl::allocator<TARGET_TYPE> >(toBegin,
2487template <
class ALLOCATOR>
2498 ALLOCATOR allocator)
2513 *fromEndPtr = fromEnd;
2520 TargetType *toPositionBegin = toBegin + (position - fromBegin);
2521 TargetType *toPositionEnd = toPositionBegin + numElements;
2528 *fromEndPtr = position;
2531 guard(toPositionEnd,
2532 toPositionEnd + (fromEnd - position),
2558 *fromEndPtr = fromBegin;
2562template <
class TARGET_TYPE>
2565 TARGET_TYPE *toBegin,
2566 TARGET_TYPE **fromEndPtr,
2567 TARGET_TYPE **lastPtr,
2568 TARGET_TYPE *fromBegin,
2569 TARGET_TYPE *position,
2570 TARGET_TYPE *fromEnd,
2576 destructiveMoveAndMoveInsert<bsl::allocator<TARGET_TYPE> >(toBegin,
2588#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
2589template <
class ALLOCATOR,
class... ARGS>
2594 ALLOCATOR allocator,
2619template <
class TARGET_TYPE,
class... ARGS>
2626 emplace<bsl::allocator<TARGET_TYPE> >(
2635template <
class ALLOCATOR>
2641 ALLOCATOR allocator)
2648 if (first == middle) {
2665template <
class TARGET_TYPE>
2668 TARGET_TYPE *middle,
2672 erase<bsl::allocator<TARGET_TYPE> >(first,
2678template <
class ALLOCATOR>
2685 ALLOCATOR allocator)
2692 if (toBegin != toEnd) {
2718template <
class TARGET_TYPE>
2725 insert<bsl::allocator<TARGET_TYPE> >(toBegin,
2731template <
class ALLOCATOR>
2737 ALLOCATOR allocator)
2744 if (0 == numElements) {
2763template <
class TARGET_TYPE>
2767 const TARGET_TYPE& value,
2771 insert<bsl::allocator<TARGET_TYPE> >(toBegin,
2778template <
class ALLOCATOR,
class FWD_ITER>
2785 ALLOCATOR allocator)
2787 if (0 == numElements) {
2809 typedef typename FWD_ITER::value_type FwdTarget;
2820 k_VALUE = k_ITER_TO_FUNC_PTRS && k_TARGET_IS_VOID_PTR
2833template <
class TARGET_TYPE,
class FWD_ITER>
2842 insert<bsl::allocator<TARGET_TYPE> >(toBegin,
2850template <
class ALLOCATOR,
class SOURCE_TYPE>
2854 SOURCE_TYPE *fromBegin,
2855 SOURCE_TYPE *fromEnd,
2857 ALLOCATOR allocator)
2859 if (0 == numElements) {
2869 k_IS_BITWISECOPYABLE =
2885template <
class TARGET_TYPE,
class SOURCE_TYPE>
2889 SOURCE_TYPE *fromBegin,
2890 SOURCE_TYPE *fromEnd,
2894 insert<bsl::allocator<TARGET_TYPE> >(toBegin,
2902template <
class ALLOCATOR>
2908 ALLOCATOR allocator)
2927template <
class TARGET_TYPE>
2930 TARGET_TYPE *fromBegin,
2931 TARGET_TYPE *fromEnd,
2934 moveConstruct<bsl::allocator<TARGET_TYPE> >(toBegin,
2940template <
class ALLOCATOR>
2949 ALLOCATOR allocator)
2968template <
class TARGET_TYPE>
2972 TARGET_TYPE **fromEndPtr,
2973 TARGET_TYPE *fromBegin,
2974 TARGET_TYPE *fromEnd,
2978 moveInsert<bsl::allocator<TARGET_TYPE> >(toBegin,
2987template <
class TARGET_TYPE>
2990 TARGET_TYPE *middle,
3014template <
class TARGET_TYPE>
3016void ArrayPrimitives_Imp::assign(TARGET_TYPE *srcStart,
3017 TARGET_TYPE *srcEnd,
3020 for ( ; srcStart != srcEnd; ++srcStart) {
3025template <
class FORWARD_ITERATOR>
3040template <
class TARGET_TYPE>
3045 return !begin != !end || begin > end;
3048template <
class TARGET_TYPE>
3050void ArrayPrimitives_Imp::reverseAssign(TARGET_TYPE *dest,
3051 TARGET_TYPE *srcStart,
3052 TARGET_TYPE *srcEnd)
3054 TARGET_TYPE *destEnd = srcEnd - srcStart + dest;
3055 while (srcStart != srcEnd) {
3056 *--destEnd = *--srcEnd;
3076 std::memset(
reinterpret_cast<char *
>(begin),
3077 static_cast<char>(value),
3094 std::memset(begin, value, numElements);
3100 unsigned char *begin,
3101 unsigned char value,
3110 std::memset(begin, value, numElements);
3126 std::memset(begin, value, numElements);
3142 std::wmemset(begin, value, numElements);
3148 unsigned short *begin,
3149 unsigned short value,
3158 reinterpret_cast<short *
>(begin),
3159 static_cast<short>(value),
3167 unsigned int *begin,
3177 reinterpret_cast<int *
>(begin),
3178 static_cast<int>(value),
3195#if defined(BSLS_PLATFORM_CPU_64_BIT) && !defined(BSLS_PLATFORM_OS_WINDOWS)
3201 reinterpret_cast<int *
>(begin),
3202 static_cast<int>(value),
3211 unsigned long *begin,
3212 unsigned long value,
3220#if defined(BSLS_PLATFORM_CPU_64_BIT) && !defined(BSLS_PLATFORM_OS_WINDOWS)
3229 reinterpret_cast<int *
>(begin),
3230 static_cast<int>(value),
3256template <
class TARGET_TYPE>
3259 TARGET_TYPE **begin,
3276 reinterpret_cast<void **
>(begin),
3277 static_cast<void *
>(value),
3283template <
class TARGET_TYPE>
3286 const TARGET_TYPE **begin,
3287 const TARGET_TYPE *value,
3299 reinterpret_cast<const void **
>(begin),
3300 static_cast<const void *
>(value),
3306template <
class TARGET_TYPE>
3309 volatile TARGET_TYPE **begin,
3310 volatile TARGET_TYPE *value,
3322 reinterpret_cast<volatile void **
>(begin),
3323 static_cast<volatile void *
>(value),
3329template <
class TARGET_TYPE>
3332 const volatile TARGET_TYPE **begin,
3333 const volatile TARGET_TYPE *value,
3345 reinterpret_cast<const volatile void **
>(begin),
3346 static_cast<const volatile void *
>(value),
3352template <
class TARGET_TYPE,
class ALLOCATOR>
3355 const TARGET_TYPE& value,
3363 if (0 == numElements) {
3367 const char *valueBuffer =
3370 std::memcpy((
void *)begin, valueBuffer,
sizeof(TARGET_TYPE));
3372 sizeof(TARGET_TYPE),
3373 sizeof(TARGET_TYPE) * numElements);
3376template <
class TARGET_TYPE,
class ALLOCATOR>
3379 const TARGET_TYPE& value,
3381 ALLOCATOR *allocator,
3388 if (0 == numElements) {
3395 TARGET_TYPE *end = begin + numElements;
3399 }
while (begin != end);
3405template <
class TARGET_TYPE,
class FWD_ITER,
class ALLOCATOR>
3408 TARGET_TYPE *toBegin,
3411 ALLOCATOR allocator,
3426#if defined(BSLALG_ARRAYPRIMITIVES_CANNOT_REMOVE_POINTER_FROM_FUNCTION_POINTER)
3429 (
void *
const *)fromBegin,
3430 (
void *
const *)fromEnd,
3435 reinterpret_cast<void * *
>(
const_cast<NcPtrType **
>(toBegin)),
3436 reinterpret_cast<void *
const *
>(
const_cast<NcIter *
const *
>(fromBegin)),
3437 reinterpret_cast<void *
const *
>(
const_cast<NcIter *
const *
>(fromEnd)),
3443template <
class FWD_ITER,
class ALLOCATOR>
3459 while (fromBegin != fromEnd) {
3463 *toBegin =
reinterpret_cast<void *
>(*fromBegin);
3469template <
class TARGET_TYPE,
class ALLOCATOR>
3472 TARGET_TYPE *toBegin,
3473 const TARGET_TYPE *fromBegin,
3474 const TARGET_TYPE *fromEnd,
3482 const size_type numBytes =
reinterpret_cast<const char*
>(fromEnd)
3483 -
reinterpret_cast<const char*
>(fromBegin);
3485 std::memcpy((
void *)toBegin, fromBegin, numBytes);
3489template <
class TARGET_TYPE,
class FWD_ITER,
class ALLOCATOR>
3491 TARGET_TYPE *toBegin,
3494 ALLOCATOR allocator,
3504 while (fromBegin != fromEnd) {
3518template <
class TARGET_TYPE,
class ALLOCATOR>
3521 TARGET_TYPE *toBegin,
3522 TARGET_TYPE *fromBegin,
3523 TARGET_TYPE *fromEnd,
3531 const size_type numBytes =
reinterpret_cast<const char*
>(fromEnd)
3532 -
reinterpret_cast<const char*
>(fromBegin);
3534 std::memcpy((
void *)toBegin, fromBegin, numBytes);
3538template <
class TARGET_TYPE,
class ALLOCATOR>
3540 TARGET_TYPE *toBegin,
3541 TARGET_TYPE *fromBegin,
3542 TARGET_TYPE *fromEnd,
3543 ALLOCATOR allocator,
3553 while (fromBegin != fromEnd) {
3564template <
class TARGET_TYPE,
class ALLOCATOR>
3566 TARGET_TYPE *toBegin,
3567 TARGET_TYPE *fromBegin,
3568 TARGET_TYPE *fromEnd,
3569 ALLOCATOR allocator,
3579 while (fromBegin != fromEnd) {
3593template <
class TARGET_TYPE,
class ALLOCATOR>
3605 std::memset(
static_cast<void *
>(begin),
3607 sizeof(TARGET_TYPE) * numElements);
3611template <
class TARGET_TYPE,
class ALLOCATOR>
3616 ALLOCATOR allocator,
3622 if (0 < numElements) {
3625 sizeof(TARGET_TYPE),
3626 numElements *
sizeof(TARGET_TYPE));
3630template <
class TARGET_TYPE,
class ALLOCATOR>
3634 ALLOCATOR allocator,
3642 const TARGET_TYPE *end = begin + numElements;
3643 while (begin != end) {
3652template <
class TARGET_TYPE,
class ALLOCATOR>
3655 TARGET_TYPE *toBegin,
3656 TARGET_TYPE *fromBegin,
3657 TARGET_TYPE *fromEnd,
3665 const size_type numBytes =
reinterpret_cast<const char*
>(fromEnd)
3666 -
reinterpret_cast<const char*
>(fromBegin);
3668 std::memcpy((
void *)toBegin, fromBegin, numBytes);
3672template <
class TARGET_TYPE,
class ALLOCATOR>
3675 TARGET_TYPE *toBegin,
3676 TARGET_TYPE *fromBegin,
3677 TARGET_TYPE *fromEnd,
3678 ALLOCATOR allocator,
3695#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
3696template <
class TARGET_TYPE,
class ALLOCATOR,
class... ARGS>
3699 TARGET_TYPE *toBegin,
3701 ALLOCATOR allocator,
3718template <
class TARGET_TYPE,
class ALLOCATOR,
class... ARGS>
3720 TARGET_TYPE *toBegin,
3722 ALLOCATOR allocator,
3744 size_type numGuarded = tailLen < numElements ? tailLen : numElements;
3750 TARGET_TYPE *destBegin = toBegin + numElements;
3752 std::memmove((
void *)destBegin,
3754 tailLen *
sizeof(TARGET_TYPE));
3761 TARGET_TYPE *destEnd = toEnd + numElements;
3764 destEnd - numGuarded,
3765 destEnd - numGuarded,
3779 if (tailLen < numElements) {
3793 while (toEnd != destBegin) {
3804template <
class TARGET_TYPE,
class ALLOCATOR,
class... ARGS>
3806 TARGET_TYPE *toBegin,
3808 ALLOCATOR allocator,
3824 if (toEnd > toBegin) {
3855 TARGET_TYPE *destEnd = toEnd;
3856 TARGET_TYPE *srcEnd = toEnd - 1;
3857 while (toBegin != srcEnd) {
3882template <
class TARGET_TYPE,
class ALLOCATOR>
3885 TARGET_TYPE *middle,
3887 ALLOCATOR allocator,
3908 size_type numBytes =
reinterpret_cast<const char *
>(last)
3909 -
reinterpret_cast<const char *
>(middle);
3911 std::memmove((
void *)first, middle, numBytes);
3915template <
class TARGET_TYPE,
class ALLOCATOR>
3918 TARGET_TYPE *middle,
3920 ALLOCATOR allocator,
3937 while (middle != last) {
3950template <
class TARGET_TYPE,
class ALLOCATOR>
3953 TARGET_TYPE *toBegin,
3955 const TARGET_TYPE& value,
3957 ALLOCATOR allocator,
3977 if (toBegin <= tempValuePtr && tempValuePtr < toEnd ) {
3980 tempValuePtr += numElements;
3987 const size_type numBytes =
reinterpret_cast<const char*
>(toEnd)
3988 -
reinterpret_cast<const char*
>(toBegin);
3990 std::memmove((
void *)(toBegin + numElements), toBegin, numBytes);
4010 numElements *
sizeof value);
4013template <
class TARGET_TYPE,
class ALLOCATOR>
4015 TARGET_TYPE *toBegin,
4017 const TARGET_TYPE& value,
4019 ALLOCATOR allocator,
4036 if (toBegin <= tempValuePtr && tempValuePtr < toEnd + numElements) {
4039 tempValuePtr += numElements;
4043 size_type numGuarded = tailLen < numElements ? tailLen : numElements;
4049 TARGET_TYPE *destBegin = toBegin + numElements;
4051 std::memmove((
void *)destBegin,
4053 tailLen *
sizeof(TARGET_TYPE));
4060 TARGET_TYPE *destEnd = toEnd + numElements;
4063 destEnd - numGuarded,
4064 destEnd - numGuarded,
4078 if (tailLen < numElements) {
4092 while (toEnd != destBegin) {
4103template <
class TARGET_TYPE,
class ALLOCATOR>
4105 TARGET_TYPE *toBegin,
4107 const TARGET_TYPE& value,
4109 ALLOCATOR allocator,
4138 const size_type tailLen = toEnd - toBegin;
4139 if (tailLen >= numElements) {
4147 toEnd - numElements,
4153 toEnd + numElements,
4166 TARGET_TYPE *src = toEnd - numElements;
4167 TARGET_TYPE *dest = toEnd;
4168 while (toBegin != src) {
4176 for ( ; toBegin != dest; ++toBegin) {
4177 *toBegin = space.
object();
4206 toEnd + numElements,
4224 for ( ; toBegin != toEnd; ++toBegin) {
4225 *toBegin = space.
object();
4235template <
class TARGET_TYPE,
class FWD_ITER,
class ALLOCATOR>
4238 TARGET_TYPE *toBegin,
4243 ALLOCATOR allocator,
4251#if defined(BSLALG_ARRAYPRIMITIVES_CANNOT_REMOVE_POINTER_FROM_FUNCTION_POINTER)
4253 insert((
void * *)toBegin,
4255 (
void *
const *)fromBegin,
4256 (
void *
const *)fromEnd,
4269 reinterpret_cast<void * *
>(
const_cast<NcPtrType **
>(toBegin)),
4270 reinterpret_cast<void * *
>(
const_cast<NcPtrType **
>(toEnd)),
4271 reinterpret_cast<void *
const *
>(
const_cast<NcIter *
const *
>(fromBegin)),
4272 reinterpret_cast<void *
const *
>(
const_cast<NcIter *
const *
>(fromEnd)),
4279template <
class TARGET_TYPE,
class ALLOCATOR>
4282 TARGET_TYPE *toBegin,
4284 const TARGET_TYPE *fromBegin,
4285 const TARGET_TYPE *fromEnd,
4314 const size_type numBytes =
reinterpret_cast<const char*
>(toEnd)
4315 -
reinterpret_cast<const char*
>(toBegin);
4317 std::memmove((
void *)(toBegin + numElements), toBegin, numBytes);
4325 std::memcpy((
void *)toBegin,
4327 numElements *
sizeof(TARGET_TYPE));
4331template <
class TARGET_TYPE,
class FWD_ITER,
class ALLOCATOR>
4333 TARGET_TYPE *toBegin,
4338 ALLOCATOR allocator,
4345 if (0 == numElements) {
4367 const size_type tailLen = toEnd - toBegin;
4368 const size_type numGuarded = tailLen < numElements ? tailLen : numElements;
4374 TARGET_TYPE *destBegin = toBegin + numElements;
4376 std::memmove((
void *)destBegin,
4378 tailLen *
sizeof(TARGET_TYPE));
4385 TARGET_TYPE *destEnd = toEnd + numElements;
4388 destEnd - numGuarded,
4389 destEnd - numGuarded,
4393 for (; guard.
middle() != guard.
end(); ++fromBegin) {
4403 if (tailLen < numElements) {
4420 for (; toEnd != destBegin; ++fromBegin) {
4431template <
class TARGET_TYPE,
class FWD_ITER,
class ALLOCATOR>
4433 TARGET_TYPE *toBegin,
4438 ALLOCATOR allocator,
4444 if (0 == numElements) {
4456 const size_type tailLen = toEnd - toBegin;
4457 if (tailLen > numElements) {
4465 toEnd - numElements,
4471 toEnd + numElements,
4478 TARGET_TYPE *src = toEnd - numElements;
4479 TARGET_TYPE *dest = toEnd;
4480 while (toBegin != src) {
4488 for (; toBegin != dest; ++toBegin, ++fromBegin) {
4489 *toBegin = *fromBegin;
4510 toEnd + numElements,
4517 for (; toBegin != toEnd; ++fromBegin, ++toBegin) {
4518 *toBegin = *fromBegin;
4534template <
class FWD_ITER,
class ALLOCATOR>
4554 if (0 == numElements) {
4576 const size_type tailLen = toEnd - toBegin;
4582 void **destBegin = toBegin + numElements;
4585 std::memmove(destBegin, toBegin, tailLen *
sizeof(
void **));
4588 for (
size_type i = 0; i < numElements; ++i) {
4589 *toBegin =
reinterpret_cast<void *
>(*fromBegin);
4598template <
class TARGET_TYPE,
class ALLOCATOR>
4601 TARGET_TYPE *toBegin,
4603 TARGET_TYPE **lastPtr,
4607 ALLOCATOR allocator,
4619 insert(toBegin, toEnd, first, last, numElements, allocator,
4624template <
class TARGET_TYPE,
class ALLOCATOR>
4627 TARGET_TYPE *toBegin,
4629 TARGET_TYPE **lastPtr,
4633 ALLOCATOR allocator,
4646 insert(toBegin, toEnd, first, last, numElements, allocator,
4654template <
class TARGET_TYPE>
4658 TARGET_TYPE *middle,
4666 reinterpret_cast<char *
>(middle),
4667 reinterpret_cast<char *
>(end));
4670template <
class TARGET_TYPE>
4673 TARGET_TYPE *middle,
4680 if (begin == middle || middle == end) {
4689 const std::size_t numElements = middle - begin;
4690 const std::size_t remElements = end - middle;
4692 if (numElements == remElements) {
4693 for (; middle != end; ++begin, ++middle) {
4694 TARGET_TYPE tmp(*middle);
4706 std::size_t numCycles = end - begin;
4707 std::size_t remainder = numElements;
4708 while (remainder != 0) {
4709 std::size_t t = numCycles % remainder;
4710 numCycles = remainder;
4721 for (std::size_t i = 0; i < numCycles; ++i) {
4726 TARGET_TYPE *ptr = begin;
4727 TARGET_TYPE tmp = *ptr;
4729 if (numElements < remElements) {
4747 std::size_t cycleSize = remElements / numCycles;
4749 for (std::size_t j = 0; j < cycleSize; ++j) {
4750 if (ptr > begin + remElements) {
4754 *ptr = *(ptr - remElements);
4758 *ptr = *(ptr + numElements);
4782 std::size_t cycleSize = numElements / numCycles - 1;
4784 for (std::size_t j = 0; j < cycleSize; ++j) {
4785 if (ptr < end - numElements) {
4786 *ptr = *(ptr + numElements);
4790 *ptr = *(ptr - remElements);
4809template <
class ALLOCATOR>
4816 ALLOCATOR allocator,
4827 ValueType *valuePtr =
4829 if (begin <= valuePtr && valuePtr < end) {
4833#if defined(BSLS_PLATFORM_PRAGMA_GCC_DIAGNOSTIC_GCC)
4835#pragma GCC diagnostic push
4836#pragma GCC diagnostic ignored "-Wclass-memaccess"
4840 std::memmove(begin + 1, begin, (end - begin) *
sizeof(ValueType));
4848#if defined(BSLS_PLATFORM_PRAGMA_GCC_DIAGNOSTIC_GCC)
4849#pragma GCC diagnostic pop
4853template <
class ALLOCATOR>
4860 ALLOCATOR allocator,
4871 ValueType *valuePtr =
4873 if (begin <= valuePtr && valuePtr < end) {
4878 size_t bytesNum = (end - begin) *
sizeof(ValueType);
4881#if defined(BSLS_PLATFORM_PRAGMA_GCC_DIAGNOSTIC_GCC)
4883#pragma GCC diagnostic push
4884#pragma GCC diagnostic ignored "-Wclass-memaccess"
4887 std::memmove(begin + 1, begin, bytesNum);
4893 class ElementsProctor {
4900 ElementsProctor(ValueType *p,
size_t n) : d_begin(p), d_bytesNum(n) {}
4903 if(d_bytesNum) std::memmove(d_begin, d_begin + 1, d_bytesNum);
4906 void release() { d_bytesNum = 0; }
4907 } proctor(begin, bytesNum);
4916#if defined(BSLS_PLATFORM_PRAGMA_GCC_DIAGNOSTIC_GCC)
4917#pragma GCC diagnostic pop
4921template <
class ALLOCATOR>
4928 ALLOCATOR allocator,
4939 ValueType *valuePtr =
4941 if (begin <= valuePtr && valuePtr < end) {
4964 end, end + 1, allocator);
4970 ValueType *dst = end;
4971 ValueType *src = end - 1;
4972 while (src != begin) {
4987#ifndef BDE_OPENSOURCE_PUBLICATION
4998#if defined(BSLALG_ARRAYPRIMITIVES_CANNOT_REMOVE_POINTER_FROM_FUNCTION_POINTER)
4999# undef BSLALG_ARRAYPRIMITIVES_CANNOT_REMOVE_POINTER_FROM_FUNCTION_POINTER
Definition bslalg_autoarraydestructor.h:232
OBJECT_TYPE * moveEnd(difference_type offset=1)
Definition bslalg_autoarraydestructor.h:329
OBJECT_TYPE * moveBegin(difference_type offset=-1)
Definition bslalg_autoarraydestructor.h:316
void release()
Definition bslalg_autoarraydestructor.h:340
Definition bslalg_autoarraymovedestructor.h:418
OBJECT_TYPE * middle() const
Return the address at the middle of the guarded range.
Definition bslalg_autoarraymovedestructor.h:579
OBJECT_TYPE * destination() const
Definition bslalg_autoarraymovedestructor.h:565
void advance()
Definition bslalg_autoarraymovedestructor.h:544
OBJECT_TYPE * end() const
Return the address at the end of the guarded range.
Definition bslalg_autoarraymovedestructor.h:572
Definition bslma_allocator.h:457
Definition bslma_destructorproctor.h:259
Definition bslmf_movableref.h:751
bslalg::ArrayPrimitives bslalg_ArrayPrimitives
This alias is defined for backward compatibility.
Definition bslalg_arrayprimitives.h:4993
#define BSLMF_ASSERT(expr)
Definition bslmf_assert.h:229
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1762
#define BSLS_COMPILERFEATURES_FORWARD(T, V)
Definition bsls_compilerfeatures.h:2018
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_UTIL_ADDRESSOF(OBJ)
Definition bsls_util.h:289
Definition bdlc_flathashmap.h:1805
Definition balxml_encoderoptions.h:68
static void construct(ALLOCATOR_TYPE &basicAllocator, ELEMENT_TYPE *elementAddr, Args &&... arguments)
Definition bslma_allocatortraits.h:1472
BloombergLP::bslma::AllocatorTraits_PointerType< ALLOCATOR_TYPE >::type pointer
Definition bslma_allocatortraits.h:1149
ALLOCATOR_TYPE::value_type value_type
Definition bslma_allocatortraits.h:1145
Definition bslmf_integralconstant.h:244
Definition bslmf_isenum.h:270
Definition bslmf_isfundamental.h:329
Definition bslmf_ismemberpointer.h:143
Definition bslmf_ispointer.h:138
Definition bslmf_issame.h:146
Definition bslmf_istriviallydefaultconstructible.h:293
Definition bslmf_isvoid.h:138
Definition bslmf_removecv.h:118
Definition bslmf_removepointer.h:255
BloombergLP::bslmf::RemovePointer_Imp< t_TYPE >::Type type
Definition bslmf_removepointer.h:267
static void destroy(TARGET_TYPE *begin, TARGET_TYPE *end, ALLOCATOR allocator, bsl::true_type)
Definition bslalg_arraydestructionprimitives.h:232
Definition bslalg_arrayprimitives.h:1896
Definition bslalg_arrayprimitives.h:1215
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:3698
static void uninitializedFillN(bsls::Types::Int64 *begin, bsls::Types::Int64 value, size_type numElements, void *=0, bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >=bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >())
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:3520
static bool isInvalidRange(FORWARD_ITERATOR begin, FORWARD_ITERATOR end)
Definition bslalg_arrayprimitives.h:3027
static void bitwiseRotateBackward(char *begin, char *middle, char *end)
static void uninitializedFillN(float *begin, float value, size_type numElements, void *=0, bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >=bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >())
static void bitwiseRotate(char *begin, char *middle, char *end)
@ e_BITWISE_MOVEABLE_TRAITS
Definition bslalg_arrayprimitives.h:1260
@ e_HAS_TRIVIAL_DEFAULT_CTOR_TRAITS
Definition bslalg_arrayprimitives.h:1258
@ e_NIL_TRAITS
Definition bslalg_arrayprimitives.h:1261
@ e_BITWISE_COPYABLE_TRAITS
Definition bslalg_arrayprimitives.h:1259
@ e_IS_FUNDAMENTAL_OR_POINTER
Definition bslalg_arrayprimitives.h:1257
@ e_IS_ITERATOR_TO_FUNCTION_POINTER
Definition bslalg_arrayprimitives.h:1255
@ e_IS_POINTER_TO_POINTER
Definition bslalg_arrayprimitives.h:1256
static void uninitializedFillN(volatile void **begin, volatile void *value, size_type numElements, void *=0, bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >=bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >())
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:4811
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:3064
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:4600
static void uninitializedFillN(double *begin, double value, size_type numElements, void *=0, bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >=bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >())
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:3565
ArrayPrimitives::difference_type difference_type
Definition bslalg_arrayprimitives.h:1247
static void bitwiseRotateForward(char *begin, char *middle, char *end)
static void uninitializedFillN(short *begin, short value, size_type numElements, void *=0, bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >=bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >())
static void copyConstruct(TARGET_TYPE *toBegin, FWD_ITER fromBegin, FWD_ITER fromEnd, ALLOCATOR allocator, bsl::integral_constant< int, e_IS_POINTER_TO_POINTER >)
Definition bslalg_arrayprimitives.h:3407
ArrayPrimitives::size_type size_type
Definition bslalg_arrayprimitives.h:1246
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:3654
static void uninitializedFillN(void **begin, void *value, size_type numElements, void *=0, bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >=bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >())
static void uninitializedFillN(int *begin, int value, size_type numElements, void *=0, bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >=bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >())
static void uninitializedFillN(const volatile void **begin, const volatile void *value, size_type numElements, void *=0, bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >=bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >())
@ k_INPLACE_BUFFER_SIZE
Definition bslalg_arrayprimitives.h:1268
static void copyConstruct(TARGET_TYPE *toBegin, FWD_ITER fromBegin, FWD_ITER fromEnd, ALLOCATOR allocator, bsl::integral_constant< int, e_IS_ITERATOR_TO_FUNCTION_POINTER >)
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:3883
static void rotate(TARGET_TYPE *begin, TARGET_TYPE *middle, TARGET_TYPE *end, bsl::integral_constant< int, e_BITWISE_MOVEABLE_TRAITS >)
Definition bslalg_arrayprimitives.h:4656
static void uninitializedFillN(long double *begin, long double value, size_type numElements, void *=0, bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >=bsl::integral_constant< int, e_IS_FUNDAMENTAL_OR_POINTER >())
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:3952
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:3595
static void uninitializedFillN(const void **begin, const void *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:418
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:2488
static void copyConstruct(typename bsl::allocator_traits< ALLOCATOR >::pointer toBegin, FWD_ITER fromBegin, FWD_ITER fromEnd, ALLOCATOR allocator)
Definition bslalg_arrayprimitives.h:1959
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:2146
ArrayPrimitives_Imp Imp
Definition bslalg_arrayprimitives.h:422
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:2680
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:2107
static void defaultConstruct(typename bsl::allocator_traits< ALLOCATOR >::pointer begin, size_type numElements, ALLOCATOR allocator)
Definition bslalg_arrayprimitives.h:2064
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:2942
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:2591
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:2904
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:2217
std::ptrdiff_t difference_type
Definition bslalg_arrayprimitives.h:424
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:2637
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
std::size_t size_type
Definition bslalg_arrayprimitives.h:423
static void rotate(TARGET_TYPE *first, TARGET_TYPE *middle, TARGET_TYPE *last)
Definition bslalg_arrayprimitives.h:2989
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
static MovableRef< t_TYPE > move(t_TYPE &reference) BSLS_KEYWORD_NOEXCEPT
Definition bslmf_movableref.h:1060
static t_TYPE & access(t_TYPE &ref) BSLS_KEYWORD_NOEXCEPT
Definition bslmf_movableref.h:1032
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:915
@ BSLS_MAX_ALIGNMENT
Definition bsls_alignmentutil.h:275
unsigned long long Uint64
Definition bsls_types.h:137
long long Int64
Definition bsls_types.h:132
Definition bsls_objectbuffer.h:276
TYPE & object()
Definition bsls_objectbuffer.h:351