# std: Add helpers to safely align pointers · gitcafe/zig

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

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

Visibility: public

Requested revision: 0c091f8b096051687a6d7f563d743387f6b39a86

Requested commit: 0c091f8b096051687a6d7f563d743387f6b39a86

Commit: 0c091f8b096051687a6d7f563d743387f6b39a86

Tree: a7ac1b80a1ccb22915c1a99cd389b31596c060d9

Author: LemonBoy

Committer: Andrew Kelley

## Message

```
std: Add helpers to safely align pointers

Add two helpers to ensure people won't ignore some edge cases such as
pointers overflowing the address space.

Also fix #8924 to some degree, the amount of unchecked alignForward is
still scary.

```

## Parents

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

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