std :: align does not take 2 to align. I will be fixed in C ++ 17, but now it is useless
See what the standard says (draft).
[ptr.align]
2 Requires:
(2.1) - alignment should be a fundamental alignment value or an extended alignment value supported by the implementation in this context.
Thus, any fundamental value of alignment is acceptable, and possibly others, if allowed by the implementation. Let's see what fundamental alignment is.
[basic.align]
2 A , , , alignof (std:: max_align_t)...
Ok. .
4 std:: size_t. , alignof , , , . .
, 2 , 2 . ++ 17 , , alignof(std::max_align_t) (.. ). .
TL; DR . std::align, ++ 17.