std::atomic_ref<T>:: required_alignment
From cppreference.com
<
cpp
|
atomic
|
atomic ref
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::atomic_ref
| Member functions | ||||
|
(C++26)
|
||||
| Constants | ||||
|
atomic_ref::required_alignment
|
||||
| Specialized member functions | ||||
|
Specialized for integral,
floating-point and pointer types |
||||
|
Specialized for integral and
pointer types only |
||||
|
(C++26)
|
||||
|
(C++26)
|
||||
| Specialized for integral types only | ||||
|
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.
Retrieved from "
https://en.cppreference.com/mwiki/index.php?title=cpp/atomic/atomic_ref/required_alignment&oldid=161441
"