[#BloombergLP-bsls-AlignmentUtil-calculateAlignmentOffset] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::xref:BloombergLP/bsls/AlignmentUtil.adoc[AlignmentUtil]::calculateAlignmentOffset :relfileprefix: ../../../ :mrdocs: Return the minimum non‐negative integer that, when added to the numerical value of the specified `address`, yields the specified `alignment`. The behavior is undefined unless `alignment` is a positive, integral power of 2. == Synopsis Declared in `<bsls_alignmentutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int calculateAlignmentOffset( void const* address, int alignment); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#