Re: Struct size

2014-04-19 Thread Andrej Mitrovic via Digitalmars-d-learn
On 4/19/14, Lars T. Kyllingstad via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Say I have two structs, defined like this: struct A { /* could contain whatever */ } struct B { A a; } My question is, is it now guaranteed that A.sizeof==B.sizeof? The best thing to

Re: Struct size

2014-04-19 Thread Lars T. Kyllingstad via Digitalmars-d-learn
On Saturday, 19 April 2014 at 12:26:16 UTC, Andrej Mitrovic via Digitalmars-d-learn wrote: On 4/19/14, Lars T. Kyllingstad via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Say I have two structs, defined like this: struct A { /* could contain whatever */ } struct B {