[#BloombergLP-bdlb-NullableValue-2constructor-093]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue]::NullableValue
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;bdlb&lowbar;nullablevalue&period;h&gt;`

Create a nullable object having the null value&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlb/NullableValue/2constructor-060.adoc[NullableValue]() noexcept;
----

[.small]#xref:BloombergLP/bdlb/NullableValue/2constructor-060.adoc[_» more&period;&period;&period;_]#

Create a nullable object having the value of the specified `original`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlb/NullableValue/2constructor-0cd.adoc[NullableValue](xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue] const& original);
----

[.small]#xref:BloombergLP/bdlb/NullableValue/2constructor-0cd.adoc[_» more&period;&period;&period;_]#

Create a nullable object converted from the specified `original`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class BDE&lowbar;OTHER&lowbar;TYPE&gt;
explicit
xref:BloombergLP/bdlb/NullableValue/2constructor-0b0.adoc[NullableValue](xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue&lt;BDE&lowbar;OTHER&lowbar;TYPE&gt;] const& original);
----

[.small]#xref:BloombergLP/bdlb/NullableValue/2constructor-0b0.adoc[_» more&period;&period;&period;_]#

Create a nullable object by moving from the specified `original`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlb/NullableValue/2constructor-07b.adoc[NullableValue](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;NullableValue&gt;] original) noexcept(&sol;&ast; see-below &ast;&sol;);
----

[.small]#xref:BloombergLP/bdlb/NullableValue/2constructor-07b.adoc[_» more&period;&period;&period;_]#

Create a null nullable object that uses the specified `allocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bdlb/NullableValue/2constructor-0ca.adoc[NullableValue](xref:BloombergLP/bdlb/NullableValue/allocator_type.adoc[allocator&lowbar;type] const& allocator) noexcept;
----

[.small]#xref:BloombergLP/bdlb/NullableValue/2constructor-0ca.adoc[_» more&period;&period;&period;_]#

Create a nullable object having the null value&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlb/NullableValue/2constructor-069.adoc[NullableValue](xref:bsl/nullopt_t.adoc[bsl::nullopt&lowbar;t] const& nullopt) noexcept;
----

[.small]#xref:BloombergLP/bdlb/NullableValue/2constructor-069.adoc[_» more&period;&period;&period;_]#

Create a nullable object having the same value as the specified `value` (of `NullableValue&lt;BDE&lowbar;OTHER&lowbar;TYPE&gt;`) converted to `TYPE`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class BDE&lowbar;OTHER&lowbar;TYPE&gt;
xref:BloombergLP/bdlb/NullableValue/2constructor-05a.adoc[NullableValue](xref:BloombergLP/bslmf/MovableRef_Deduced.adoc[BloombergLP::bslmf::MovableRef&lowbar;Deduced&lt;NullableValue&lt;BDE&lowbar;OTHER&lowbar;TYPE&gt;&gt;] value)
requires bsl&colon;&colon;is&lowbar;convertible&lt;BDE&lowbar;OTHER&lowbar;TYPE, TYPE&gt;&colon;&colon;value &amp;&amp;
                     !bsl&colon;&colon;is&lowbar;same&lt;bsl&colon;&colon;optional&lt;BDE&lowbar;OTHER&lowbar;TYPE&gt;, TYPE&gt;&colon;&colon;value;
----

[.small]#xref:BloombergLP/bdlb/NullableValue/2constructor-05a.adoc[_» more&period;&period;&period;_]#

Create a nullable object from the specified optional `value`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class BDE&lowbar;OTHER&lowbar;TYPE&gt;
xref:BloombergLP/bdlb/NullableValue/2constructor-0fd2.adoc[NullableValue](xref:BloombergLP/bslmf/MovableRef_Deduced.adoc[BloombergLP::bslmf::MovableRef&lowbar;Deduced&lt;bsl::optional&lt;BDE&lowbar;OTHER&lowbar;TYPE&gt;&gt;] value)
requires bsl&colon;&colon;is&lowbar;convertible&lt;BDE&lowbar;OTHER&lowbar;TYPE, TYPE&gt;&colon;&colon;value &amp;&amp;
                     !bsl&colon;&colon;is&lowbar;same&lt;bsl&colon;&colon;optional&lt;BDE&lowbar;OTHER&lowbar;TYPE&gt;, TYPE&gt;&colon;&colon;value;
----

[.small]#xref:BloombergLP/bdlb/NullableValue/2constructor-0fd2.adoc[_» more&period;&period;&period;_]#

Create a nullable object from the specified optional `value`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class BDE&lowbar;OTHER&lowbar;TYPE&gt;
xref:BloombergLP/bdlb/NullableValue/2constructor-041.adoc[NullableValue](xref:bsl/optional-072.adoc[bsl::optional&lt;BDE&lowbar;OTHER&lowbar;TYPE&gt;] const& value)
requires bsl&colon;&colon;is&lowbar;convertible&lt;BDE&lowbar;OTHER&lowbar;TYPE, TYPE&gt;&colon;&colon;value &amp;&amp;
                     !bsl&colon;&colon;is&lowbar;same&lt;bsl&colon;&colon;optional&lt;BDE&lowbar;OTHER&lowbar;TYPE&gt;, TYPE&gt;&colon;&colon;value;
----

[.small]#xref:BloombergLP/bdlb/NullableValue/2constructor-041.adoc[_» more&period;&period;&period;_]#

Create a nullable object from the specified `value` converted to `TYPE`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class BDE&lowbar;OTHER&lowbar;TYPE&gt;
xref:BloombergLP/bdlb/NullableValue/2constructor-0fd4.adoc[NullableValue](BDE&lowbar;OTHER&lowbar;TYPE&& value)
requires bsl&colon;&colon;is&lowbar;convertible&lt;BDE&lowbar;OTHER&lowbar;TYPE, TYPE&gt;&colon;&colon;value &amp;&amp;
                      !bsl&colon;&colon;is&lowbar;convertible&lt;BDE&lowbar;OTHER&lowbar;TYPE,
                                           allocator&lowbar;type&gt;&colon;&colon;value;
----

[.small]#xref:BloombergLP/bdlb/NullableValue/2constructor-0fd4.adoc[_» more&period;&period;&period;_]#

Create a nullable object by moving `original` using `allocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlb/NullableValue/2constructor-0cb.adoc[NullableValue](
    xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;NullableValue&gt;] original,
    xref:BloombergLP/bdlb/NullableValue/allocator_type.adoc[allocator&lowbar;type] const& allocator);
----

[.small]#xref:BloombergLP/bdlb/NullableValue/2constructor-0cb.adoc[_» more&period;&period;&period;_]#

Create a copy of `original` that uses the specified `allocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlb/NullableValue/2constructor-042.adoc[NullableValue](
    xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue] const& original,
    xref:BloombergLP/bdlb/NullableValue/allocator_type.adoc[allocator&lowbar;type] const& allocator);
----

[.small]#xref:BloombergLP/bdlb/NullableValue/2constructor-042.adoc[_» more&period;&period;&period;_]#

Create a null nullable object that uses the specified `allocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlb/NullableValue/2constructor-099.adoc[NullableValue](
    xref:bsl/nullopt_t.adoc[bsl::nullopt&lowbar;t] const& nullopt,
    xref:BloombergLP/bdlb/NullableValue/allocator_type.adoc[allocator&lowbar;type] const& allocator) noexcept;
----

[.small]#xref:BloombergLP/bdlb/NullableValue/2constructor-099.adoc[_» more&period;&period;&period;_]#

Create a nullable object by converting the specified `value`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class BDE&lowbar;OTHER&lowbar;TYPE&gt;
xref:BloombergLP/bdlb/NullableValue/2constructor-051.adoc[NullableValue](
    xref:BloombergLP/bslmf/MovableRef_Deduced.adoc[BloombergLP::bslmf::MovableRef&lowbar;Deduced&lt;NullableValue&lt;BDE&lowbar;OTHER&lowbar;TYPE&gt;&gt;] value,
    xref:BloombergLP/bdlb/NullableValue/allocator_type.adoc[allocator&lowbar;type] const& allocator)
requires bsl&colon;&colon;is&lowbar;convertible&lt;BDE&lowbar;OTHER&lowbar;TYPE, TYPE&gt;&colon;&colon;value &amp;&amp;
                     !bsl&colon;&colon;is&lowbar;same&lt;bsl&colon;&colon;optional&lt;BDE&lowbar;OTHER&lowbar;TYPE&gt;, TYPE&gt;&colon;&colon;value;
----

[.small]#xref:BloombergLP/bdlb/NullableValue/2constructor-051.adoc[_» more&period;&period;&period;_]#

Create a nullable object from the specified `value` using the specified `allocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class BDE&lowbar;OTHER&lowbar;TYPE&gt;
xref:BloombergLP/bdlb/NullableValue/2constructor-0c4.adoc[NullableValue](
    xref:BloombergLP/bslmf/MovableRef_Deduced.adoc[BloombergLP::bslmf::MovableRef&lowbar;Deduced&lt;bsl::optional&lt;BDE&lowbar;OTHER&lowbar;TYPE&gt;&gt;] value,
    xref:BloombergLP/bdlb/NullableValue/allocator_type.adoc[allocator&lowbar;type] const& allocator)
requires bsl&colon;&colon;is&lowbar;convertible&lt;BDE&lowbar;OTHER&lowbar;TYPE, TYPE&gt;&colon;&colon;value &amp;&amp;
                     !bsl&colon;&colon;is&lowbar;same&lt;bsl&colon;&colon;optional&lt;BDE&lowbar;OTHER&lowbar;TYPE&gt;, TYPE&gt;&colon;&colon;value;
----

[.small]#xref:BloombergLP/bdlb/NullableValue/2constructor-0c4.adoc[_» more&period;&period;&period;_]#

Create a nullable object from `original` using `allocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class BDE&lowbar;OTHER&lowbar;TYPE&gt;
xref:BloombergLP/bdlb/NullableValue/2constructor-0bf.adoc[NullableValue](
    xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue&lt;BDE&lowbar;OTHER&lowbar;TYPE&gt;] const& original,
    xref:BloombergLP/bdlb/NullableValue/allocator_type.adoc[allocator&lowbar;type] const& allocator);
----

[.small]#xref:BloombergLP/bdlb/NullableValue/2constructor-0bf.adoc[_» more&period;&period;&period;_]#

Create a nullable object having the value of the specified `value` (of `BDE&lowbar;OTHER&lowbar;TYPE`) converted to `TYPE` and that uses the specified `allocator` to supply memory&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class BDE&lowbar;OTHER&lowbar;TYPE&gt;
xref:BloombergLP/bdlb/NullableValue/2constructor-0a.adoc[NullableValue](
    xref:bsl/optional-072.adoc[bsl::optional&lt;BDE&lowbar;OTHER&lowbar;TYPE&gt;] const& value,
    xref:BloombergLP/bdlb/NullableValue/allocator_type.adoc[allocator&lowbar;type] const& allocator)
requires bsl&colon;&colon;is&lowbar;convertible&lt;BDE&lowbar;OTHER&lowbar;TYPE, TYPE&gt;&colon;&colon;value &amp;&amp;
                     !bsl&colon;&colon;is&lowbar;same&lt;bsl&colon;&colon;optional&lt;BDE&lowbar;OTHER&lowbar;TYPE&gt;, TYPE&gt;&colon;&colon;value;
----

[.small]#xref:BloombergLP/bdlb/NullableValue/2constructor-0a.adoc[_» more&period;&period;&period;_]#

Create a nullable object from `value` using the specified `allocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class BDE&lowbar;OTHER&lowbar;TYPE&gt;
xref:BloombergLP/bdlb/NullableValue/2constructor-070.adoc[NullableValue](
    BDE&lowbar;OTHER&lowbar;TYPE&& value,
    xref:BloombergLP/bdlb/NullableValue/allocator_type.adoc[allocator&lowbar;type] const& allocator)
requires bsl&colon;&colon;is&lowbar;convertible&lt;BDE&lowbar;OTHER&lowbar;TYPE, TYPE&gt;&colon;&colon;value;
----

[.small]#xref:BloombergLP/bdlb/NullableValue/2constructor-070.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *original*
| object providing the initial value
| *allocator*
| allocator used to supply memory
| *nullopt*
| disengaged&hyphen;optional tag
| *value*
| nullable object from which to move
|===


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