
2 Aug
2012
2 Aug
'12
4:34 a.m.
On Thursday 02 August 2012 06:03:22 Lars Viklund wrote:
Isn't there a standard section that mentions that some flavor of sequence-of-char storage must have alignment suitable for any natural alignment on the platform?
Might just be constrained to free store allocations or something, I guess.
Yes, this is a requirement for pointers returned by malloc and ::operator new. Structure's alignment is the largest alignment of its members. Array's alignment is the alignment of the array element.