[#BloombergLP-bdlar-ChoiceConstRef-accessSelection]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlar.adoc[bdlar]::xref:BloombergLP/bdlar/ChoiceConstRef.adoc[ChoiceConstRef]::accessSelection
:relfileprefix: ../../../
:mrdocs:

Invoke the specified `accessor` on the current selection&period;

== Synopsis

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

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

== Description

Invoke the specified `accessor` on the (non&hyphen;modifiable) selection, supplying `accessor` with the corresponding selection information structure&period; The supplied `accessor` must be a callable type that can be called as if it had the following signature&colon; &grave; template &lt;class t&lowbar;INFO&gt; int accessor(const SELECTION&amp; refOrValue, const t&lowbar;INFO&amp; info)&semi; &grave; Return the value returned from the invocation of `accessor`&period; The behavior is undefined unless `selectionId() !&equals; &hyphen;1`&period;

== Return Value

value from the invocation of `accessor`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *accessor*
| callable invoked on the current selection
|===


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