[#BloombergLP-bsls-Alignment-calculateAlignmentOffset] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::xref:BloombergLP/bsls/Alignment.adoc[Alignment]::calculateAlignmentOffset :relfileprefix: ../../../ :mrdocs: 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. == Synopsis Declared in `<bsls_alignment.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int calculateAlignmentOffset( void const* address, int alignment); ---- == Description DEPRECATED: Use `AlignmentUtil::calculateAlignmentOffset` instead. [.small]#Created with https://www.mrdocs.com[MrDocs]#