[#BloombergLP-bdld-Datum-adoptMap-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdld.adoc[bdld]::xref:BloombergLP/bdld/Datum.adoc[Datum]::adoptMap
:relfileprefix: ../../../
:mrdocs:

Return a datum that takes ownership of the specified `map`&period;

== Synopsis

Declared in `&lt;bdld&lowbar;datum&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdld/Datum.adoc[Datum]
adoptMap(xref:BloombergLP/bdld/DatumMutableMapRef.adoc[DatumMutableMapRef] const& map);
----

== Description

Return, by value, a datum that refers to the specified `map`&period; The behavior is undefined unless `map` was created using `createUninitializedMap` method&period; 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&period; Note that the adopted map is owned and will be freed if `Datum&colon;&colon;destroy` is called on the returned object&period;

== Return Value

a datum that takes ownership of the specified `map`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *map*
| mutable map previously created uninitialized
|===


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