Hello,

I am looking for feedback on a proposal which concerns a new property of types which I call static layout types. In short these are types which layouts do not vary between objects of type. In practice it excludes types employing virtual inheritance.

https://vasama.github.io/wg21/static-layout

I included some wording, but it undoubtedly requires more work. I am also not yet decided on whether the larger concept of static-layout type is really needed, or if static-layout class is sufficient.

Beyond offsetof, there are some potential future features which would benefit from the concept of static layout, such as deriving an offset from a pointer-to-data-member of a static-layout class, or deriving a reference to an object from a reference to a member subobject and a matching pointer-to-data-member, as was discussed last december [1].

[1] https://github.com/SciresM/containing_object_of_member/blob/master/containing_object_of_member.pdf