8#ifndef INCLUDED_BSLALG_AUTOARRAYMOVEDESTRUCTOR
9#define INCLUDED_BSLALG_AUTOARRAYMOVEDESTRUCTOR
383#include <bslscm_version.h>
418template <
class OBJECT_TYPE,
class ALLOCATOR = bsl::allocator<OBJECT_TYPE> >
422 OBJECT_TYPE *d_dst_p;
424 OBJECT_TYPE *d_begin_p;
426 OBJECT_TYPE *d_middle_p;
430 OBJECT_TYPE *d_end_p;
432 ALLOCATOR d_allocator;
461 ALLOCATOR allocator = ALLOCATOR());
478 OBJECT_TYPE *
begin()
const;
486 OBJECT_TYPE *
end()
const;
489 OBJECT_TYPE *
middle()
const;
501template <
class OBJECT_TYPE,
class ALLOCATOR>
504 OBJECT_TYPE *destination,
509: d_dst_p(destination)
513, d_allocator(allocator)
523template <
class OBJECT_TYPE,
class ALLOCATOR>
532 || d_end_p <= d_dst_p
533 || d_middle_p == d_end_p);
535 if (d_middle_p != d_end_p) {
536 std::size_t numBytes = (
char *)d_end_p - (
char *)d_middle_p;
537 std::memcpy((
void *)d_dst_p, d_middle_p, numBytes);
545template <
class OBJECT_TYPE,
class ALLOCATOR>
558template <
class OBJECT_TYPE,
class ALLOCATOR>
565template <
class OBJECT_TYPE,
class ALLOCATOR>
573template <
class OBJECT_TYPE,
class ALLOCATOR>
580template <
class OBJECT_TYPE,
class ALLOCATOR>
589#ifndef BDE_OPENSOURCE_PUBLICATION
594#ifdef bslalg_AutoArrayMoveDestructor
595#undef bslalg_AutoArrayMoveDestructor
598#define bslalg_AutoArrayMoveDestructor bslalg::AutoArrayMoveDestructor
Definition bslalg_autoarraymovedestructor.h:419
OBJECT_TYPE * middle() const
Return the address at the middle of the guarded range.
Definition bslalg_autoarraymovedestructor.h:582
OBJECT_TYPE * destination() const
Definition bslalg_autoarraymovedestructor.h:568
void advance()
Definition bslalg_autoarraymovedestructor.h:547
OBJECT_TYPE * begin() const
Return the address at the beginning of the guarded range.
Definition bslalg_autoarraymovedestructor.h:560
~AutoArrayMoveDestructor()
Definition bslalg_autoarraymovedestructor.h:524
OBJECT_TYPE * end() const
Return the address at the end of the guarded range.
Definition bslalg_autoarraymovedestructor.h:575
#define BSLMF_ASSERT(expr)
Definition bslmf_assert.h:231
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1917
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bdlc_flathashmap.h:2218
static void destroy(TARGET_TYPE *begin, TARGET_TYPE *end, ALLOCATOR allocator, bsl::true_type)
Definition bslalg_arraydestructionprimitives.h:238
Definition bslmf_isbitwisemoveable.h:718