Provide functions and traits that expose bdlat array behavior.

Description

This namespace provides functions that expose "array" behavior for "array" types. Specializations are provided for bsl::vector<TYPE>. See the component‐level documentation for more information.

Types

Name

Description

ElementType

This meta‐function should contain a typedef Type that specifies the type of element stored in an array of the parameterized TYPE.

IsArray

This struct should be specialized for third‐party types that are need to expose "array" behavior. See the component‐level documentation for further information.

Functions

Name

Description

accessElement

Invoke the specified accessor on the non‐modifiable element at the specified index of the specified array.

bdlat_arrayAccessElement

Invoke the specified accessor on the element at the specified index of the specified array. Return the value from the invocation of accessor.

bdlat_arrayManipulateElement

Apply the specified manipulator to the element at the specified index in the specified array.

bdlat_arrayReserve

Reserve capacity for the specified array to hold at least the specified numElements elements.

bdlat_arrayResize

Resize the specified array to contain the specified newSize elements.

bdlat_arraySize

Return the number of elements in the specified array.

bdlat_arraySupportsReserve

bdlat_arraySupportsReserve overloads

manipulateElement

` Return the value from the invocation of manipulator. The behavior is undefined unless 0 <= index and index < size(*array).

reserve

If successful, make the capacity of the specified modifiable array at least the specified numElements and return zero.

resize

Set the size of the specified modifiable array to the specified newSize.

size

Return the number of elements in the specified array.

supportsReserve

Return true if reserve will attempt to reserve capacity in the specified array, and false otherwise.

Created with MrDocs