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

Create a nullable object from `value` using the specified `allocator`&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(
    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;
----

== Description

Create a nullable object that has the specified `value` (of `BDE&lowbar;OTHER&lowbar;TYPE`) converted to `TYPE` and that uses the specified `allocator` (e&period;g&period;, the address of a `bslma&colon;&colon;Allocator` object) to supply memory&period; Note that this constructor will not participate in overload resolution unless `TYPE` is allocator aware and `BDE&lowbar;OTHER&lowbar;TYPE` is convertible to `TYPE`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *value*
| value converted to `TYPE`
| *allocator*
| allocator used to supply memory
|===


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