An instance of this union is a raw block of memory suitable for storing an object of type TYPE. Specifically, the size and alignment of this union exactly matches that of TYPE. A TYPE object can be constructed into an ObjectBuffer using the placement new operator and can be destroyed by explicitly calling its destructor, ~TYPE(). It is the user's responsibility to perform this construction and destruction; an ObjectBuffer object does not manage the construction or destruction of any other objects.

Synopsis

Declared in <bsls_objectbuffer.h>

template<class TYPE>
union ObjectBuffer;

Description

Note that a collaboration is implied between ObjectBuffer and the user. An ObjectBuffer provides aligned memory and the user handles construction and destruction of the object contained within that memory.

Member Functions

Name

Description

address

address overloads

buffer

buffer overloads

object

object overloads

Created with MrDocs