BloombergLP::bdld::Datum::copyBinary

Return a datum owning a copy of the specified binary value.

Synopsis

Declared in <bdld_datum.h>

static
Datum
copyBinary(
    void const* value,
    SizeType size,
    AllocatorType const& allocator);

Description

Return, by value, a datum referring to the copy of the specified value of the specified size, using the specified allocator to supply memory (if needed). The behavior is undefined unless `size <= UINT_MAX`. Note that the copy of the binary data is owned and will be freed if Datum::destroy is called on the returned object.

Return Value

a datum owning a copy of the specified binary value

Parameters

NameDescription
valuebinary data to copy
sizesize of value in bytes
allocatormemory allocator to use