# packed structs support comptime bitcasting · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/3ee9d06cbdb6bcaf561e7215c4c103c7ad65a72d)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 3ee9d06cbdb6bcaf561e7215c4c103c7ad65a72d

Requested commit: 3ee9d06cbdb6bcaf561e7215c4c103c7ad65a72d

Commit: 3ee9d06cbdb6bcaf561e7215c4c103c7ad65a72d

Tree: c9f612c22c8e2d2e1191a5aab8fc2bfaebf4cfcd

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
packed structs support comptime bitcasting

 * `type_size_store` is no longer a thing. loading and storing a pointer
   to a value may dereference up to `@sizeOf(T)` bytes, even for
   integers such as `u24`.
 * fix `types_have_same_zig_comptime_repr` to not think that the
   same `ZigTypeId` means the `ConstExprValue` neccesarily has the
   same representation.
 * implement `buf_write_value_bytes` and `buf_read_value_bytes` for
   `ContainerLayoutPacked`

closes #1120

```

## Parents

- [079728752eca4cffbb4f7e8dc06d5e23b81d7627](https://git.cafe/gitcafe/zig/commit/079728752eca4cffbb4f7e8dc06d5e23b81d7627?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/3ee9d06cbdb6bcaf561e7215c4c103c7ad65a72d?format=markdown)
