Create a ManagedDatum object having the same value as the specified original object and the specified allocator.

Synopsis

Declared in <bdld_manageddatum.h>

ManagedDatum(
    bslmf::MovableRef<ManagedDatum> original,
    allocator_type const& allocator);

Description

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.

Parameters

Name

Description

original

object providing the value

allocator

allocator used to supply memory

Created with MrDocs