Skip to content

Commit 5d90066

Browse files
committed
LWG4377 Misleading note about lock-free property of std::atomic_ref
1 parent 72f0eb6 commit 5d90066

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

source/threads.tex

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3239,14 +3239,10 @@
32393239

32403240
\pnum
32413241
\begin{note}
3242-
Hardware could require an object
3243-
referenced by an \tcode{atomic_ref}
3244-
to have stricter alignment\iref{basic.align}
3245-
than other objects of type \tcode{T}.
3246-
Further, whether operations on an \tcode{atomic_ref}
3247-
are lock-free could depend on the alignment of the referenced object.
3248-
For example, lock-free operations on \tcode{std::complex<double>}
3249-
could be supported only if aligned to \tcode{2*alignof(double)}.
3242+
An implementation can choose to define
3243+
\tcode{atomic_ref<T>::required_alignment}
3244+
to a value greater than \tcode{alignof(T)} in order to ensure that
3245+
operations on all objects of type \tcode{atomic_ref<T>} are lock-free.
32503246
\end{note}
32513247
\end{itemdescr}
32523248

0 commit comments

Comments
 (0)