Subject: Re: [boost] [forward_declare] Interest Inquiry toward Faster Compile Times
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2012-08-02 00:34:22


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.