8#ifndef INCLUDED_BSLALG_AUTOARRAYMOVEDESTRUCTOR
9#define INCLUDED_BSLALG_AUTOARRAYMOVEDESTRUCTOR
383#include <bslscm_version.h>
417template <
class OBJECT_TYPE,
class ALLOCATOR = bsl::allocator<OBJECT_TYPE> >
421 OBJECT_TYPE *d_dst_p;
423 OBJECT_TYPE *d_begin_p;
425 OBJECT_TYPE *d_middle_p;
429 OBJECT_TYPE *d_end_p;
431 ALLOCATOR d_allocator;
459 ALLOCATOR allocator = ALLOCATOR());
475 OBJECT_TYPE *
begin()
const;
483 OBJECT_TYPE *
end()
const;
486 OBJECT_TYPE *
middle()
const;
498template <
class OBJECT_TYPE,
class ALLOCATOR>
501 OBJECT_TYPE *destination,
506: d_dst_p(destination)
510, d_allocator(allocator)
520template <
class OBJECT_TYPE,
class ALLOCATOR>
529 || d_end_p <= d_dst_p
530 || d_middle_p == d_end_p);
532 if (d_middle_p != d_end_p) {
533 std::size_t numBytes = (
char *)d_end_p - (
char *)d_middle_p;
534 std::memcpy((
void *)d_dst_p, d_middle_p, numBytes);
542template <
class OBJECT_TYPE,
class ALLOCATOR>
555template <
class OBJECT_TYPE,
class ALLOCATOR>
562template <
class OBJECT_TYPE,
class ALLOCATOR>
570template <
class OBJECT_TYPE,
class ALLOCATOR>
577template <
class OBJECT_TYPE,
class ALLOCATOR>
586#ifndef BDE_OPENSOURCE_PUBLICATION
591#ifdef bslalg_AutoArrayMoveDestructor
592#undef bslalg_AutoArrayMoveDestructor
595#define bslalg_AutoArrayMoveDestructor bslalg::AutoArrayMoveDestructor
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 * begin() const
Return the address at the beginning of the guarded range.
Definition bslalg_autoarraymovedestructor.h:557
~AutoArrayMoveDestructor()
Definition bslalg_autoarraymovedestructor.h:521
OBJECT_TYPE * end() const
Return the address at the end of the guarded range.
Definition bslalg_autoarraymovedestructor.h:572
#define BSLMF_ASSERT(expr)
Definition bslmf_assert.h:229
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1762
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlc_flathashmap.h:1805
static void destroy(TARGET_TYPE *begin, TARGET_TYPE *end, ALLOCATOR allocator, bsl::true_type)
Definition bslalg_arraydestructionprimitives.h:232
Definition bslmf_isbitwisemoveable.h:718