[#BloombergLP-bslalg-AutoArrayMoveDestructor] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::AutoArrayMoveDestructor :relfileprefix: ../../ :mrdocs: This `class` provides a specialized proctor that bit‐wise moves and destroys array segments upon destruction. == Synopsis Declared in `<bslalg_autoarraymovedestructor.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class OBJECT_TYPE, class ALLOCATOR = xref:bsl/allocator-0df.adoc[bsl::allocator<OBJECT_TYPE>]> class AutoArrayMoveDestructor; ---- == Description Upon destruction and unless the `release` method has been called, this proctor bit‐wise moves the elements in a segment of an array of parameterized `OBJECT_TYPE` back to some destination, and destroys some other elements in an adjacent segment of the same array. The elements destroyed are delimited by the range `[ begin(), middle() )]` and those moved to `destination()` and in the range `[ middle(), end() )]`. Note that, once constructed, `begin()` and `end()` remain fixed. As the guard advances, `middle()` and `destination()` move, reflecting the successful transfer of data between the moving range and the destination. == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslalg/AutoArrayMoveDestructor/2constructor.adoc[`AutoArrayMoveDestructor`] [.small]#[constructor]# | Create a proctor for moving and destroying the specified array ranges. | xref:BloombergLP/bslalg/AutoArrayMoveDestructor/2destructor.adoc[`~AutoArrayMoveDestructor`] [.small]#[destructor]# | Bit‐wise move the range `[ middle(), end() )]` to the `destination()` address and destroy `[ begin(), middle() )]`. | xref:BloombergLP/bslalg/AutoArrayMoveDestructor/advance.adoc[`advance`] | Increment both middle and destination pointers by one position. | xref:BloombergLP/bslalg/AutoArrayMoveDestructor/begin.adoc[`begin`] | Return the address at the beginning of the guarded range. | xref:BloombergLP/bslalg/AutoArrayMoveDestructor/destination.adoc[`destination`] | Return the destination address for elements moved on destruction. | xref:BloombergLP/bslalg/AutoArrayMoveDestructor/end.adoc[`end`] | Return the address at the end of the guarded range. | xref:BloombergLP/bslalg/AutoArrayMoveDestructor/middle.adoc[`middle`] | Return the address at the middle of the guarded range. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#