Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Function is_aligned

boost::alignment::is_aligned

Synopsis

// In header: <boost/align/is_aligned.hpp>


bool is_aligned(std::size_t alignment, const void * ptr);

Description

Determines whether the space pointed to by ptr has alignment specified by alignment.

Parameters:

alignment

Shall be a power of two.

ptr

Pointer to test for alignment.

Returns:

true if and only if ptr points to space that has alignment specified by alignment.


PrevUpHomeNext