how to define a struct without padding

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed May 24 18:34:35 PDT 2017


On Thursday, 25 May 2017 at 01:25:44 UTC, aki wrote:
> align(1) struct WAVEFORMATEX {

align(1) on the outside removes padding from the end.

You also need `align(1):` on the inside to move all the padding 
to the end.


align(1) struct NAME {
    align(1):
       members
}



More information about the Digitalmars-d-learn mailing list