C Programming/stdalign.h

To query and specify the alignment of an object, include the header.

Macro
In, four macros are defined.


 * alignas
 * Expanded to.


 * alignof
 * Expanded to.


 * _alignas_is_defined
 * expands to integer constant 1.

Expanded to integer constant 1. and  are suitable for use with   preprocessing directives.
 * _alignas_is_defined

alignas
specifies the alignment in bytes for declaring variables.


 * Example
 * Result
 * Result

alignof
returns the alignment required by the specified type in.


 * Example
 * Result
 * Result

History
The alignas type specifier (keyword_Alignas), alignof operator (keyword_Alignof), header, added in ISO/IEC 9899:2011.