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

Synopsis

Declared in <bdlat_arrayfunctions.h>

template<
    class TYPE,
    class ALLOC,
    class ACCESSOR>
int
bdlat_arrayAccessElement(
    bsl::vector<TYPE, ALLOC> const& array,
    ACCESSOR& accessor,
    int index);

Return Value

result of invoking accessor

Parameters

Name

Description

array

array whose element is accessed

accessor

functor applied to the element at index

index

position of the element to access

Created with MrDocs