BloombergLP::bdld::Datum::adoptMap

Return a datum that takes ownership of the specified key-owning map.

Synopsis

Declared in <bdld_datum.h>

static
Datum
adoptMap(DatumMutableMapOwningKeysRef const& map);

Description

Return, by value, a datum that refers to the specified map. The behavior is undefined unless map was created using createUninitializedMapOwningKeys method. The behavior is also undefined unless each element in the held map has been assigned a value and the size of the map has been set accordingly. The behavior is also undefined unless keys have been copied into the map. Note that the adopted map is owned and will be freed if Datum::destroy is called on the returned object.

Return Value

a datum that takes ownership of the specified key-owning map

Parameters

NameDescription
mapmutable key-owning map previously created uninitialized