alignment of struct
bearophile
bearophileHUGS at lycos.com
Thu Mar 13 17:07:11 PDT 2014
Justin Whear:
> It did change a few versions ago (not sure exactly when). Try
> adding
> `align(1):` inside the structs before the members.
Yes it's a recent change, the align() on outside is the alignment
of the whole struct, and the align inside is the alignment of the
single field relative to the start of the struct or the precedent
field.
align(1) struct Foo {
align(1) double x;
}
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list