Return true if the specified address is aligned on the specified alignment boundary (i.e., the numerical value of address is evenly divisible by alignment), and false otherwise. The behavior is undefined unless alignment is a power of 2. Note that this function will true for a null address, regardless of alignment and for a 0 alignment regardless of address.

Synopsis

Declared in <bsls_alignmentutil.h>

static
bool
isAligned(
    void const* address,
    std::size_t alignment);

Created with MrDocs