[#BloombergLP-bsls-AlignmentUtil-isAligned]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::xref:BloombergLP/bsls/AlignmentUtil.adoc[AlignmentUtil]::isAligned
:relfileprefix: ../../../
:mrdocs:

Return whether the specified address is aligned to the given boundary&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
bool
isAligned(
    void const* address,
    std::size&lowbar;t alignment);
----

== Description

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

== Return Value

`true` if `address` is aligned to `alignment`, else `false`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *address*
| pointer whose alignment is tested
| *alignment*
| alignment boundary, a power of 2
|===


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