<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-12-16 16:45 GMT+01:00 Henning Thielemann <span dir="ltr"><<a href="mailto:lemming@henning-thielemann.de" target="_blank">lemming@henning-thielemann.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I more think of a custom struct with size 12 bytes consisting of a 64 bit and 32 bit word. It must be 8-byte aligned. You would have to align all elements at multiples of 8-byte and the address difference between two array elements is 16 not 12.<br>
<br>
On x86 Linux there would be no problem because a 12 byte struct containing a 64 bit word must already be padded to 16 byte. But that's an ABI definition and Storable wants to keep independent from that, right?<br></blockquote><div><br></div><div>Yes, that's an ABI issue. Once again: Storable is *not* for structs, it never has been and will never be (because there is no single correct instance for composite struct-like types). Without any further assumptions, the gap-less definition is the only one which makes sense. And without instances for struct-like things, it even makes more sense.</div><div><br></div><div>So what you want is an instance of the proposed StorableAMD64 class. Taking your example: An array without gaps of your 12byte struct would e.g. be totally OK for OpenGL or a packed AMD64-conformant struct, so base shouldn't choose one for you.</div></div><br></div></div>