# add BoundedArrayAligned \(\#14580\) · gitcafe/zig

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

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

Visibility: public

Requested revision: e0dd20b02ea026e125b36b3674f20aa20ff043e3

Requested commit: e0dd20b02ea026e125b36b3674f20aa20ff043e3

Commit: e0dd20b02ea026e125b36b3674f20aa20ff043e3

Tree: e1536da7724b4822695028de04d02f9c296fb21b

Author: Motiejus Jakštys

Committer: GitHub

## Message

```
add BoundedArrayAligned (#14580)

This is useful for creating byte buffers of actually-different-things.
Copied the argument order from `Allocator.alignedAlloc`

I noted that `ArrayListAligned` is going out of it's way to not set the
alignment at comptime when it is not specified. However, I was not able
to do that the same way here, and good people on IRC, @ifreund in
particular (thanks!) assured me that

    [N]T align(@alignOf(T))

is equivalent to

    [N]T
```

## Parents

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

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