# std::atomic_ref<T>::required_alignment

> C++ Atlas: `cppatlas.com/w/cpp/atomic/atomic_ref/required_alignment` | Source: https://en.cppreference.com/w/cpp/atomic/atomic_ref/required_alignment | Domain: atomic | Standards: C++20

The value of required_alignment is the required alignment for an object to be referenced by an atomic reference, which is at least alignof(T).

## Official Specification Summary (cppreference)

```cpp
static constexpr std::size_t required_alignment = /*implementation-defined*/; // (since C++20)
```

The value of `required_alignment` is the required alignment for an object to be referenced by an atomic reference, which is at least `alignof(T)`.

### Notes

Hardware could require that an object to be referenced by an `atomic_ref<T>` have stricter alignment than other `T` objects, and whether operations on an `atomic_ref` are lock-free can depend on the alignment of the referenced object.

---
Attribution: content from https://en.cppreference.com/w/cpp/atomic/atomic_ref/required_alignment (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.