[#BloombergLP-bslfmt-visit_format_arg]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslfmt.adoc[bslfmt]::visit&lowbar;format&lowbar;arg
:relfileprefix: ../../
:mrdocs:

Invoke `visitor` on the value contained by `arg`&period;

== Synopsis

Declared in `&lt;bslfmt&lowbar;format&lowbar;arg&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;VISITOR,
    class t&lowbar;CONTEXT&gt;
decltype(auto)
visit&lowbar;format&lowbar;arg(
    t&lowbar;VISITOR&& visitor,
    xref:BloombergLP/bslfmt/basic_format_arg-0d.adoc[basic&lowbar;format&lowbar;arg&lt;t&lowbar;CONTEXT&gt;] arg);
----

== Description

Invoke the specified `visitor` functor on the value contained by the specified `arg`, providing that functor non&hyphen;modifiable access to that value&period; `visitor` must be a `variant`&hyphen;style functor that is able to visit all supported types listed in the &lcub;DESCRIPTION&rcub;&period;

== Return Value

result of invoking `visitor` on the contained value

== Parameters

[cols="1,4"]
|===
| Name| Description
| *visitor*
| functor invoked with the contained value
| *arg*
| format argument whose contained value is visited
|===


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