8#ifndef INCLUDED_BSLS_ALIGNEDBUFFER
9#define INCLUDED_BSLS_ALIGNEDBUFFER
188#include <bsls_alignmenttotype.h>
205template <
int SIZE,
int ALIGNMENT>
216#if defined(BSLS_COMPILERFEATURES_SUPPORT_ALIGNAS)
220 alignas(ALIGNMENT)
char d_buffer[SIZE];
230#if defined(BSLS_PLATFORM_CMP_MSVC) && !defined(BSLS_COMPILERFEATURES_SUPPORT_ALIGNAS)
235#define BSLS_ALIGNAS(N) __declspec(align(N))
239union AlignedBuffer_Data<SIZE, 2> {BSLS_ALIGNAS(2) char
d_buffer[SIZE]; };
241union AlignedBuffer_Data<SIZE, 4> {BSLS_ALIGNAS(4) char
d_buffer[SIZE]; };
243union AlignedBuffer_Data<SIZE, 8> {BSLS_ALIGNAS(8) char
d_buffer[SIZE]; };
245union AlignedBuffer_Data<SIZE, 16> {BSLS_ALIGNAS(16) char
d_buffer[SIZE]; };
261template <
int SIZE,
int ALIGNMENT = AlignmentUtil::BSLS_MAX_ALIGNMENT>
293template <
int SIZE,
int ALIGNMENT>
297 return d_data.d_buffer;
301template <
int SIZE,
int ALIGNMENT>
305 return d_data.d_buffer;
310#ifndef BDE_OPENSOURCE_PUBLICATION
315#ifdef bsls_AlignedBuffer
316#undef bsls_AlignedBuffer
319#define bsls_AlignedBuffer bsls::AlignedBuffer
Definition bsls_alignedbuffer.h:262
char * buffer()
Definition bsls_alignedbuffer.h:295
const char * buffer() const
Definition bsls_alignedbuffer.h:303
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bdlt_iso8601util.h:707
AlignmentImpPriorityToType< PRIORITY >::Type Type
Definition bsls_alignmenttotype.h:396
Definition bsls_alignedbuffer.h:206
AlignmentToType< ALIGNMENT >::Type AlignmentType
Definition bsls_alignedbuffer.h:214
AlignmentType d_align
Definition bsls_alignedbuffer.h:226
char d_buffer[SIZE]
Definition bsls_alignedbuffer.h:225