[#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&hyphen;negative offset in bytes that, when added to the specified `address`, yields the specified `alignment`&period; The behavior is undefined unless `0 &lt; alignment` and `alignment` is a power of 2&period;

== Synopsis

Declared in `&lt;bsls&lowbar;alignment&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
calculateAlignmentOffset(
    void const* address,
    int alignment);
----

== Description

DEPRECATED&colon; Use `AlignmentUtil&colon;&colon;calculateAlignmentOffset` instead&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
