Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -700,11 +700,20 @@

\item Otherwise, the object indicated by the glvalue is read\iref{defns.access}.
Let \tcode{V} be the value contained in the object.
If \tcode{T} is an integer type,
the prvalue result is
the value of type \tcode{T} congruent\iref{basic.fundamental} to \tcode{V}, and
The prvalue result is
\begin{itemize}
\item
the value of type \tcode{T} congruent\iref{basic.fundamental} to \tcode{V}
if \tcode{T} is an integer type,
\item
the result of \tcode{reinterpret_cast<T>(reinterpret_cast<std::uintptr_t>(V))}
if \tcode{T} is volatile-qualified
and \tcode{V} is a pointer value
that is not valid in the context of the evaluation\iref{basic.compound}, and
\item
\tcode{V} otherwise.
\end{itemize}
\end{itemize}

\pnum
\begin{note}
Expand Down Expand Up @@ -8248,9 +8257,19 @@
let \tcode{V} be the result of the right operand;
the object referred to by the left operand is
modified\iref{defns.access} by replacing its value
with \tcode{V} or,
with
\begin{itemize}
\item
the value congruent\iref{basic.fundamental} to \tcode{V}
if the object is of integer type,
with the value congruent\iref{basic.fundamental} to \tcode{V}.
\item
the result of \tcode{reinterpret_cast<T>(reinterpret_cast<std::uintptr_t>(V))}
if the left operand is a volatile-qualified glvalue of pointer type \tcode{T}
and \tcode{V} is a pointer value
that is not valid in the context of the evaluation\iref{basic.compound}, and
\item
\tcode{V} otherwise.
\end{itemize}

\pnum
\indextext{assignment!conversion by}%
Expand Down
16 changes: 16 additions & 0 deletions source/threads.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4170,6 +4170,14 @@
the specialization \tcode{atomic_ref<\placeholder{pointer-type}>} provides
additional atomic operations appropriate to pointer types.

\pnum
Except during constant evaluation,
when an operation on an atomic pointer
would otherwise result in a pointer value \tcode{p}
that is not valid in the context of the evaluation\iref{basic.compound},
that result instead is
\tcode{reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(p))}.

\pnum
The program is ill-formed
if \tcode{is_always_lock_free} is \tcode{false} and
Expand Down Expand Up @@ -5818,6 +5826,14 @@
Specializations of this partial specialization are standard-layout structs.
They each have a trivial destructor.

\pnum
Except during constant evaluation,
when an operation on an atomic pointer
would otherwise result in a pointer value \tcode{p}
that is not valid in the context of the evaluation\iref{basic.compound},
that result instead is
\tcode{reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(p))}.

\pnum
Descriptions are provided below only for members that differ from the primary template.

Expand Down
Loading