Structure Alignment Question

Hello,

The C11 and C++11 standards include alignment-specifiers using '_Alignas()' and 'alignas()', respectively. The standards also say alignment-specifiers may be used on structure declarations/definitions. Where might I find information indicating the default alignment of a structure? The standards do not appear to contain any such information.
You probably want to use the alignof operator.

http://en.cppreference.com/w/cpp/language/alignof
The default alignment is implementation dependent and is normally selected to be something that the target hardware can operate on quickly.
Topic archived. No new replies allowed.