[#BloombergLP-bdlar-ArrayConstRef-accessElement]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlar.adoc[bdlar]::xref:BloombergLP/bdlar/ArrayConstRef.adoc[ArrayConstRef]::accessElement
:relfileprefix: ../../../
:mrdocs:

Invoke the specified `accessor` on the array element at the specified `index`&period; The supplied `accessor` must be a callable type that can be called as if it had the following signature&colon; &grave; int accessor(const ELEMENT&amp; ref)&semi; &grave; Return the value from the invocation of `accessor`&period; The behavior is undefined unless `0 &lt;&equals; index &lt; size()`&period;

== Synopsis

Declared in `&lt;bdlar&lowbar;arrayref&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;ACCESSOR&gt;
int
accessElement(
    t&lowbar;ACCESSOR& accessor,
    int index) const;
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
