I still don't understand the align attribute

bearophile bearophileHUGS at lycos.com
Thu Jun 3 05:06:35 PDT 2010


Trass3r:
> So those align(4)s are completely useless since the default alignment is  
> chosen anyways?

On 64 bit CPUs/systems the alignment can be 8, so if you ask for 4 you get 4 instead of 8.


> This is just as I would expect but this leaves no chance to specify  
> alignment for individual members, does it?

You can put the alignment to single members.

I suggest you to print the .alignof attribute of all your members in your experiments, so you can answer to your own questions in a quick way.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list