8#ifndef INCLUDED_BSLS_ALIGNEDBUFFER
9#define INCLUDED_BSLS_ALIGNEDBUFFER
188#include <bsls_alignmenttotype.h>
205template <
int SIZE,
int ALIGNMENT>
215#if defined(BSLS_COMPILERFEATURES_SUPPORT_ALIGNAS)
219 alignas(ALIGNMENT)
char d_buffer[SIZE];
229#if defined(BSLS_PLATFORM_CMP_MSVC) && !defined(BSLS_COMPILERFEATURES_SUPPORT_ALIGNAS)
234#define BSLS_ALIGNAS(N) __declspec(align(N))
238union AlignedBuffer_Data<SIZE, 2> {BSLS_ALIGNAS(2) char
d_buffer[SIZE]; };
240union AlignedBuffer_Data<SIZE, 4> {BSLS_ALIGNAS(4) char
d_buffer[SIZE]; };
242union AlignedBuffer_Data<SIZE, 8> {BSLS_ALIGNAS(8) char
d_buffer[SIZE]; };
244union AlignedBuffer_Data<SIZE, 16> {BSLS_ALIGNAS(16) char
d_buffer[SIZE]; };
260template <
int SIZE,
int ALIGNMENT = AlignmentUtil::BSLS_MAX_ALIGNMENT>
292template <
int SIZE,
int ALIGNMENT>
296 return d_data.d_buffer;
300template <
int SIZE,
int ALIGNMENT>
304 return d_data.d_buffer;
309#ifndef BDE_OPENSOURCE_PUBLICATION
314#ifdef bsls_AlignedBuffer
315#undef bsls_AlignedBuffer
318#define bsls_AlignedBuffer bsls::AlignedBuffer
Definition bsls_alignedbuffer.h:261
char * buffer()
Definition bsls_alignedbuffer.h:294
const char * buffer() const
Definition bsls_alignedbuffer.h:302
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlt_iso8601util.h:691
AlignmentImpPriorityToType< PRIORITY >::Type Type
Definition bsls_alignmenttotype.h:394
Definition bsls_alignedbuffer.h:206
AlignmentToType< ALIGNMENT >::Type AlignmentType
Definition bsls_alignedbuffer.h:213
AlignmentType d_align
Definition bsls_alignedbuffer.h:225
char d_buffer[SIZE]
Definition bsls_alignedbuffer.h:224