union.sizeof
kinke via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Mar 25 16:27:50 PDT 2017
On Saturday, 25 March 2017 at 22:54:30 UTC, zabruk70 wrote:
> But for clearness...
> I was thinked, that align not changes SIZE, but changes
> LOCATION.
> I was thinked, that "align(X) union Union1"
> just force compiler to place Union1 on boundaries of X bytes...
In order for all Union1 instances in an array to be aligned on
boundaries of X bytes, the size of Union1 needs to be padded to a
multiple of X in such a case.
More information about the Digitalmars-d-learn
mailing list