alignForSize

Order the provided members to minimize size while preserving alignment. Returns a declaration to be mixed in.

version(none)
char[]
alignForSize
(
E...
)
(
string[] names...
)

Examples

struct Banner {
mixin(alignForSize!(byte[6], double)(["name", "height"]));
}

Alignment is not always optimal for 80-bit reals, nor for structs declared as align(1).

Meta