Skip to content

Commit fc3da0d

Browse files
committed
P3822R2 Conditional noexcept specifiers in compound requirements
[conv.lval]p3.5 [expr.assign]p2 Replaced non-existent reference "6.7.5.5.3" with [basic.compound]
1 parent 14ed707 commit fc3da0d

2 files changed

Lines changed: 40 additions & 5 deletions

File tree

source/expressions.tex

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -700,11 +700,20 @@
700700

701701
\item Otherwise, the object indicated by the glvalue is read\iref{defns.access}.
702702
Let \tcode{V} be the value contained in the object.
703-
If \tcode{T} is an integer type,
704-
the prvalue result is
705-
the value of type \tcode{T} congruent\iref{basic.fundamental} to \tcode{V}, and
703+
The prvalue result is
704+
\begin{itemize}
705+
\item
706+
the value of type \tcode{T} congruent\iref{basic.fundamental} to \tcode{V}
707+
if \tcode{T} is an integer type,
708+
\item
709+
the result of \tcode{reinterpret_cast<T>(reinterpret_cast<std::uintptr_t>(V))}
710+
if \tcode{T} is volatile-qualified
711+
and \tcode{V} is a pointer value
712+
that is not valid in the context of the evaluation\iref{basic.compound}, and
713+
\item
706714
\tcode{V} otherwise.
707715
\end{itemize}
716+
\end{itemize}
708717

709718
\pnum
710719
\begin{note}
@@ -8248,9 +8257,19 @@
82488257
let \tcode{V} be the result of the right operand;
82498258
the object referred to by the left operand is
82508259
modified\iref{defns.access} by replacing its value
8251-
with \tcode{V} or,
8260+
with
8261+
\begin{itemize}
8262+
\item
8263+
the value congruent\iref{basic.fundamental} to \tcode{V}
82528264
if the object is of integer type,
8253-
with the value congruent\iref{basic.fundamental} to \tcode{V}.
8265+
\item
8266+
the result of \tcode{reinterpret_cast<T>(reinterpret_cast<std::uintptr_t>(V))}
8267+
if the left operand is a volatile-qualified glvalue of pointer type \tcode{T}
8268+
and \tcode{V} is a pointer value
8269+
that is not valid in the context of the evaluation\iref{basic.compound}, and
8270+
\item
8271+
\tcode{V} otherwise.
8272+
\end{itemize}
82548273

82558274
\pnum
82568275
\indextext{assignment!conversion by}%

source/threads.tex

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4170,6 +4170,14 @@
41704170
the specialization \tcode{atomic_ref<\placeholder{pointer-type}>} provides
41714171
additional atomic operations appropriate to pointer types.
41724172

4173+
\pnum
4174+
Except during constant evaluation,
4175+
when an operation on an atomic pointer
4176+
would otherwise result in a pointer value \tcode{p}
4177+
that is not valid in the context of the evaluation\iref{basic.compound},
4178+
that result instead is
4179+
\tcode{reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(p))}.
4180+
41734181
\pnum
41744182
The program is ill-formed
41754183
if \tcode{is_always_lock_free} is \tcode{false} and
@@ -5818,6 +5826,14 @@
58185826
Specializations of this partial specialization are standard-layout structs.
58195827
They each have a trivial destructor.
58205828

5829+
\pnum
5830+
Except during constant evaluation,
5831+
when an operation on an atomic pointer
5832+
would otherwise result in a pointer value \tcode{p}
5833+
that is not valid in the context of the evaluation\iref{basic.compound},
5834+
that result instead is
5835+
\tcode{reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(p))}.
5836+
58215837
\pnum
58225838
Descriptions are provided below only for members that differ from the primary template.
58235839

0 commit comments

Comments
 (0)