Return the byte offset needed to align the specified address.
Declared in <bsls_alignment.h>
static
int
calculateAlignmentOffset(
void const* address,
int alignment);
Return the smallest non-negative offset in bytes that, when added to the specified address, yields the specified alignment. The behavior is undefined unless 0 < alignment and alignment is a power of 2.
DEPRECATED: Use AlignmentUtil::calculateAlignmentOffset instead.
smallest non-negative offset in bytes
| Name | Description |
|---|---|
| address | memory address to align |
| alignment | required alignment; must be a power of 2 |