BloombergLP::bsls::AlignmentUtil::is4ByteAligned

Return whether the specified address is aligned on a 4-byte boundary.

Synopsis

Declared in <bsls_alignmentutil.h>

static
bool
is4ByteAligned(void const* address);

Description

Return true if the specified address is aligned on a 4-byte boundary (i.e., the numerical value of address is evenly divisible by 4), and false otherwise.

Return Value

true if address is 4-byte aligned, else false

Parameters

NameDescription
addresspointer whose alignment is tested