8#ifndef INCLUDED_BSLS_ALIGNMENTUTIL
9#define INCLUDED_BSLS_ALIGNMENTUTIL
208#include <bsls_alignmentfromtype.h>
236 typedef void (*FuncPtr)();
251 long long d_longLong;
255 FuncPtr d_funcPointer;
258#if ! (defined(BSLS_PLATFORM_CPU_POWERPC) && defined(BSLS_PLATFORM_OS_LINUX))
259 long double d_longDouble;
261#if defined(BSLS_PLATFORM_CPU_X86) \
262 && (defined(BSLS_PLATFORM_CMP_GNU) || defined(BSLS_PLATFORM_CMP_CLANG)) \
263 && !defined(BSLS_PLATFORM_OS_SOLARIS)
264 AlignmentImp8ByteAlignedType
398 alignment &= -alignment;
428 return static_cast<int>(
429 (alignment -
reinterpret_cast<std::size_t
>(address))
436 return 0 == (
reinterpret_cast<std::size_t
>(address) & 0x1);
442 return 0 == (
reinterpret_cast<std::size_t
>(address) & 0x3);
448 return 0 == (
reinterpret_cast<std::size_t
>(address) & 0x7);
463#ifndef BDE_OPENSOURCE_PUBLICATION
bsls::AlignmentUtil bsls_AlignmentUtil
This alias is defined for backward compatibility.
Definition bsls_alignmentutil.h:469
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1762
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlt_iso8601util.h:691
Definition bsls_alignmentfromtype.h:376
AlignmentImpPriorityToType< PRIORITY >::Type Type
Definition bsls_alignmenttotype.h:394
Definition bsls_alignmentutil.h:230
static bool is2ByteAligned(const void *address)
Definition bsls_alignmentutil.h:434
static bool is4ByteAligned(const void *address)
Definition bsls_alignmentutil.h:440
friend union MaxAlignedUnion
Definition bsls_alignmentutil.h:239
static std::size_t roundUpToMaximalAlignment(std::size_t size)
Definition bsls_alignmentutil.h:452
AlignmentToType< BSLS_MAX_ALIGNMENT >::Type MaxAlignedType
Definition bsls_alignmentutil.h:282
static int calculateAlignmentOffset(const void *address, int alignment)
Definition bsls_alignmentutil.h:408
@ BSLS_MAX_ALIGNMENT
Definition bsls_alignmentutil.h:275
static bool is8ByteAligned(const void *address)
Definition bsls_alignmentutil.h:446
static int calculateAlignmentFromSize(std::size_t size)
Definition bsls_alignmentutil.h:344