Invoke the specified accessor on the non-modifiable element at the specified index of the specified array.
Declared in <bdlat_arrayfunctions.h>
template<
class TYPE,
class ACCESSOR>
int
accessElement(
TYPE const& array,
ACCESSOR& accessor,
int index);
The supplied accessor must be a callable type that can be called as if it had the following signature: ` int accessor(const ELEMENT_TYPE& element); ` Return the value from the invocation of accessor. The behavior is undefined unless 0 <= index and index < size(array).
result of invoking accessor
| Name | Description |
|---|---|
| array | array whose element is accessed |
| accessor | functor applied to the element at index |
| index | position of the element to access |