[#BloombergLP-bdld-ManagedDatum-2constructor-0e] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdld.adoc[bdld]::xref:BloombergLP/bdld/ManagedDatum.adoc[ManagedDatum]::ManagedDatum :relfileprefix: ../../../ :mrdocs: Constructors == Synopses Declared in `<bdld_manageddatum.h>` Create a `ManagedDatum` object having the default (null) value, and the specified `allocator` (e.g., the address of a `bslma::Allocator` object) to supply memory. Calling `isNull` on the resulting managed `Datum` object returns `true`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdld/ManagedDatum/2constructor-002.adoc[ManagedDatum](); ---- [.small]#xref:BloombergLP/bdld/ManagedDatum/2constructor-002.adoc[_» more..._]# Create a `ManagedDatum` object having the same value and allocator as the specified `original` object. The value of `original` becomes unspecified but valid, and its allocator remains unchanged. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdld/ManagedDatum/2constructor-085.adoc[ManagedDatum](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<ManagedDatum>] original); ---- [.small]#xref:BloombergLP/bdld/ManagedDatum/2constructor-085.adoc[_» more..._]# Create a `ManagedDatum` object having the default (null) value and using the specified `allocator` to supply memory. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdld/ManagedDatum/2constructor-003.adoc[ManagedDatum](xref:BloombergLP/bdld/ManagedDatum/allocator_type.adoc[allocator_type] const& allocator); ---- [.small]#xref:BloombergLP/bdld/ManagedDatum/2constructor-003.adoc[_» more..._]# Create a `ManagedDatum` object having the same value as the specified `original` object and the specified `allocator` (e.g., the address of a `bslma::Allocator` object) used to supply memory. The allocator of `original` remains unchanged. If `original` and the newly created object have the same allocator then the value of `original` becomes unspecified but valid, and no exceptions will be thrown; otherwise `original` is unchanged and an exception may be thrown. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdld/ManagedDatum/2constructor-05.adoc[ManagedDatum]( xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<ManagedDatum>] original, xref:BloombergLP/bdld/ManagedDatum/allocator_type.adoc[allocator_type] const& allocator); ---- [.small]#xref:BloombergLP/bdld/ManagedDatum/2constructor-05.adoc[_» more..._]# Create a `ManagedDatum` object that assumes ownership of the specified `datum`. Optionally specify an `allocator` (e.g., the address of a `bslma::Allocator` object) to supply memory; otherwise, the default allocator is used. The behavior is undefined unless `datum` was allocated using the indicated allocator and is not subsequently destroyed externally using `Datum::destroy`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdld/ManagedDatum/2constructor-0f.adoc[ManagedDatum]( xref:BloombergLP/bdld/Datum.adoc[Datum] const& datum, xref:BloombergLP/bdld/ManagedDatum/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/bdld/ManagedDatum/2constructor-0f.adoc[_» more..._]# Create a `ManagedDatum` object having the same value as the specified `original` object. Optionally specify an `allocator` (e.g., the address of a `bslma::Allocator` object) used to supply memory; otherwise, the default allocator is used. This operation performs a `clone` of the underlying `Datum`, see {Value Semantics} for more detail. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdld/ManagedDatum/2constructor-08b.adoc[ManagedDatum]( xref:BloombergLP/bdld/ManagedDatum.adoc[ManagedDatum] const& original, xref:BloombergLP/bdld/ManagedDatum/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/bdld/ManagedDatum/2constructor-08b.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#