On Friday, 16 December 2016 at 18:25:42 UTC, David Zhang wrote:
I though all classes were aligned to sizeof(size_t) boundaries?
I don't know.
Wouldn't it then just bealign(sizeof(size_t)) byte[__traits(classInstanceSize, SomeClass)] scStorage;
I guess? I really don't have much of a clue here.Looking around a bit, I found std.traits.classInstanceAlignment which seems fitting.
http://dlang.org/phobos/std_traits.html#classInstanceAlignment