BloombergLP::bdld::ManagedDatum::ManagedDatum

Create a ManagedDatum object that assumes ownership of the specified datum.

Synopsis

Declared in <bdld_manageddatum.h>

explicit
ManagedDatum(
    Datum const& datum,
    allocator_type const& allocator = allocator_type());

Description

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.

Parameters

NameDescription
datumDatum object whose ownership is assumed
allocatorallocator used to supply memory