The buffer is of type char and therefore will be aligned for char , but it actually wants to keep X in it, and X may need other alignment to char , and therefore the alignas specifier allows it to make sure that it is correctly aligned for X objects.
source share