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: [email protected]
Reporter: [email protected]
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.
--