BloombergLP::bslalg::AutoArrayDestructor::AutoArrayDestructor

Create a proctor for the specified range of array elements.

Synopsis

Declared in <bslalg_autoarraydestructor.h>

AutoArrayDestructor(
    OBJECT_TYPE* begin,
    OBJECT_TYPE* end,
    ALLOCATOR allocator = ALLOCATOR());

Description

Create an array exception guard object for the sequence of elements of the parameterized OBJECT_TYPE delimited by the range specified by [ begin, end )]. The behavior is undefined unless begin <= end and each element in the range [ begin, end )] has been initialized.

Parameters

NameDescription
beginbeginning of the range of elements to guard
endend of the range of elements to guard (one past the last)
allocatorallocator used to destroy elements