Thread overview | |||||
---|---|---|---|---|---|
|
June 20, 2022 [Issue 16270] scoped Alignment | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16270 kinke <kinke@gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |kinke@gmx.net Resolution|--- |WORKSFORME --- Comment #1 from kinke <kinke@gmx.net> --- I'm not sure whether this hasn't worked in the past, but it now definitely does: ``` struct S { align(4) { byte a; short b; bool c; } ulong d; } static assert(S.a.offsetof == 0); static assert(S.b.offsetof == 4); static assert(S.c.offsetof == 8); static assert(S.d.offsetof == 16); ``` -- |
June 20, 2022 [Issue 16270] scoped Alignment | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16270 Richard Cattermole <alphaglosined@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alphaglosined@gmail.com --- Comment #2 from Richard Cattermole <alphaglosined@gmail.com> --- (In reply to kinke from comment #1) run.dlang.org reports this as working on all D compilers. -- |
June 20, 2022 [Issue 16270] scoped Alignment | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16270 --- Comment #3 from Richard Cattermole <alphaglosined@gmail.com> --- (In reply to Richard Cattermole from comment #2) > (In reply to kinke from comment #1) > > run.dlang.org reports this as working on all D compilers. Ugh I meant all dmd compilers. -- |
Copyright © 1999-2021 by the D Language Foundation