[#beman-optional-optional-03-2constructor-0c]
= xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::xref:beman/optional/optional-03.adoc[optional]::optional
:relfileprefix: ../../../
:mrdocs:

Copy constructs the value from `rhs` if it has one&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
optional(xref:beman/optional/optional-03.adoc[optional] const& rhs)
requires std&colon;&colon;is&lowbar;copy&lowbar;constructible&lowbar;v&lt;T&gt; &amp;&amp; (!std&colon;&colon;is&lowbar;trivially&lowbar;copy&lowbar;constructible&lowbar;v&lt;T&gt;);
----

== Parameters

[cols="1,4"]
|===
|Name|Description

| *rhs*
| The object to copy construct from
|===


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