[#beman-optional-optional-03-and_then-02]
= xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::xref:beman/optional/optional-03.adoc[optional]::and&lowbar;then
:relfileprefix: ../../../
:mrdocs:

Applies a function to the contained value if there is one&period;

== Synopses

Declared in `&lt;beman&sol;optional&sol;optional&period;hpp&gt;`

Applies a function to the contained value if there is one&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class F&gt;
constexpr
auto
xref:beman/optional/optional-03/and_then-03.adoc[and&lowbar;then](F&& f) &amp;;
----

[.small]#xref:beman/optional/optional-03/and_then-03.adoc[_» more&period;&period;&period;_]#

Applies a function to the contained value if there is one&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class F&gt;
constexpr
auto
xref:beman/optional/optional-03/and_then-0d.adoc[and&lowbar;then](F&& f) &amp;&amp;;
----

[.small]#xref:beman/optional/optional-03/and_then-0d.adoc[_» more&period;&period;&period;_]#

Applies a function to the contained value if there is one&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class F&gt;
constexpr
auto
xref:beman/optional/optional-03/and_then-0c.adoc[and&lowbar;then](F&& f) const &amp;;
----

[.small]#xref:beman/optional/optional-03/and_then-0c.adoc[_» more&period;&period;&period;_]#

Applies a function to the contained value if there is one&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class F&gt;
constexpr
auto
xref:beman/optional/optional-03/and_then-08.adoc[and&lowbar;then](F&& f) const &amp;&amp;;
----

[.small]#xref:beman/optional/optional-03/and_then-08.adoc[_» more&period;&period;&period;_]#

== Return Value

auto

== Template Parameters

[cols="1,4"]
|===
| Name| Description
| *F*
| The type of the invocable
|===

== Parameters

[cols="1,4"]
|===
| Name| Description
| *f*
| The invocable to apply to the contained value
|===


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