Skip to content

Commit

Permalink
Merge 2022-11 CWG Motion 5
Browse files Browse the repository at this point in the history
P2710R0 Core Language Working Group NB comment resolutions for the November, 2022 meeting; issue 2654
  • Loading branch information
tkoeppe committed Nov 23, 2022
2 parents 09e1d93 + 079156d commit 96c9400
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 3 additions & 4 deletions source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7191,10 +7191,9 @@
The behavior of an expression of the form \tcode{E1 \placeholder{op}= E2}
is equivalent to \tcode{E1 = E1 \placeholder{op} E2} except
that \tcode{E1} is evaluated only once.
Such expressions are deprecated
if \tcode{E1} has volatile-qualified type
and \placeholder{op} is not one of the bitwise operators
\tcode{|}, \tcode{\&}, \tcode{\caret}; see~\ref{depr.volatile.type}.
\begin{note}
The object designated by \tcode{E1} is accessed twice.
\end{note}
For \tcode{+=} and \tcode{-=},
\tcode{E1} shall either have arithmetic type or be a pointer to a
possibly cv-qualified completely-defined object type. In all other
Expand Down
4 changes: 1 addition & 3 deletions source/future.tex
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@
brachiosaur = neck; // OK
tail = brachiosaur; // OK
tail = brachiosaur = neck; // deprecated
brachiosaur += neck; // deprecated
brachiosaur = brachiosaur + neck; // OK
brachiosaur |= neck; // OK, bitwise compound expression
brachiosaur += neck; // OK
\end{codeblock}
\end{example}

Expand Down

0 comments on commit 96c9400

Please sign in to comment.