Wednesday, August 16, 2017

C++11: Alignment

You can use the alignof() function to get the alignment (in number of bytes) of a type. Here is an example:
constexpr int intAlignmentInBytes = alignof(long long);


No comments:

Post a Comment