BloombergLP::bsls::AlignedBuffer

Uninitialized buffer of specified SIZE and ALIGNMENT.

Synopsis

Declared in <bsls_alignedbuffer.h>

template<
    int SIZE,
    int ALIGNMENT = AlignmentUtil::BSLS_MAX_ALIGNMENT>
class AlignedBuffer;

Description

An instance of this union is a block of raw memory of specified SIZE and ALIGNMENT. A AlignedBuffer object does not manage the construction or destruction of any other objects. SIZE is rounded up to the nearest multiple of ALIGNMENT. An instantiation of this union template will not compile unless ALIGNMENT is a power of two not larger than AlignmentUtil::BSLS_MAX_ALIGNMENT.

Member Functions

NameDescription
buffer Return the address of the first byte of this object.