[#BloombergLP-bdlcc-StripedUnorderedMap-visitReadOnly-04]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/StripedUnorderedMap.adoc[StripedUnorderedMap]::visitReadOnly
:relfileprefix: ../../../
:mrdocs:

`visitReadOnly` overloads

== Synopses

Declared in `&lt;bdlcc&lowbar;stripedunorderedmap&period;h&gt;`

Call read&hyphen;only `visitor` on every element until finished or it returns false&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlcc/StripedUnorderedMap/visitReadOnly-05.adoc[visitReadOnly](xref:BloombergLP/bdlcc/StripedUnorderedMap/ReadOnlyVisitorFunction.adoc[ReadOnlyVisitorFunction] const& visitor) const;
----

[.small]#xref:BloombergLP/bdlcc/StripedUnorderedMap/visitReadOnly-05.adoc[_» more&period;&period;&period;_]#

Call read&hyphen;only `visitor` on the element having `key`, if present&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlcc/StripedUnorderedMap/visitReadOnly-0e.adoc[visitReadOnly](
    KEY const& key,
    xref:BloombergLP/bdlcc/StripedUnorderedMap/ReadOnlyVisitorFunction.adoc[ReadOnlyVisitorFunction] const& visitor) const;
----

[.small]#xref:BloombergLP/bdlcc/StripedUnorderedMap/visitReadOnly-0e.adoc[_» more&period;&period;&period;_]#

== Return Value

* number of elements visited, or its negation if stopped early
* the number of elements visited, or `&hyphen;1` if `visitor` returned `false`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *visitor*
| read&hyphen;only functor invoked with each element
| *key*
| key of the element to visit
|===


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