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

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;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class BDE&lowbar;OTHER&lowbar;TYPE&gt;
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,
    xref:BloombergLP/bdlb/NullableValue.adoc[EnableType] = EnableType())
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]#Created with https://www.mrdocs.com[MrDocs]#
