Create an uninitialized datum map and load a reference into result.

Synopsis

Declared in <bdld_datum.h>

static
void
createUninitializedMap(
    DatumMutableMapRef* result,
    SizeType capacity,
    AllocatorType const& allocator);

Description

Load the specified result with a reference to a newly created datum map having the specified capacity, using the specified allocator to supply memory. The behavior is undefined if capacity DatumMapEntry objects would exceed the addressable memory for the platform. Note that the caller is responsible for filling in elements into the datum map and setting its size accordingly. The number of elements in the datum map cannot exceed capacity. Also note that any elements in the datum map that need dynamic memory, should also be allocated with allocator.

Parameters

Name

Description

result

receives the mutable map reference

capacity

maximum number of entries the map can hold

allocator

memory allocator to use

Created with MrDocs