Struct field reordering

Justin Whear justin at economicmodeling.com
Thu Jan 2 08:42:04 PST 2014


On Thu, 02 Jan 2014 02:11:11 +0000, bearophile wrote:

> Seen this on Reddit:
> 
> http://www.catb.org/esr/structure-packing/
> 
> It could be useful to have in Phobos some template that given pair-name
> pairs (or a struct type) returns those fields in a better packed order
> (without using align()).
> 
> See also: https://d.puremagic.com/issues/show_bug.cgi?id=8873
> 
> Bye,
> bearophile

http://dlang.org/phobos/std_typecons.html#.alignForSize


More information about the Digitalmars-d-learn mailing list