object-introspection icon indicating copy to clipboard operation
object-introspection copied to clipboard

Container Alignment is Broken

Open ajor opened this issue 1 year ago • 0 comments

See tests at https://github.com/facebookexperimental/object-introspection/blob/main/test/integration/alignment.toml

We normally deal with alignment by adding explicit padding members to structs. However, this does not work for containers, where we do not control padding ourselves.

We need a way of determining what the alignment of a given type is, and then we must apply an alignas specifier to our generated types.

ajor avatar May 24 '23 13:05 ajor