BloombergLP::bdld::Datum::createArrayReference

Return a datum referring to the specified array without copying it.

Synopsis

Declared in <bdld_datum.h>

static
Datum
createArrayReference(
    Datum const* array,
    SizeType length,
    AllocatorType const& allocator);

Description

Return, by value, a datum referring to the specified array, having the specified length, using the specified allocator to supply memory (if needed). array is not copied, and is not freed when the returned object is destroyed with Datum::destroy. The behavior is undefined unless array contains at least length elements. The behavior is also undefined unless length <= UINT_MAX.

Return Value

a datum referring to the specified array without copying it

Parameters

NameDescription
arrayarray of Datum values to reference
lengthnumber of elements in array
allocatormemory allocator to use