[Issue 19987] New: std.variantN wastes space
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 19 14:19:51 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19987
Issue ID: 19987
Summary: std.variantN wastes space
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: john.loughran.colvin at gmail.com
Because the function pointer is stored before the union and for anything other
than small sizes the union is larger (and has larger alignment), if you ask for
a size of 24 you get 48 as the total size, as opposed to 32 if the fptr and
union order is swapped.
--
More information about the Digitalmars-d-bugs
mailing list