This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-12-20
[Accepted as a DR at the November, 2022 meeting.]
Many functions of volatile were deprecated in C++20. In C++23,volatile compound operations were de-deprecated by P2327. Therationale for this de-deprecation is lacking.
Deprecation is not removal. P2327 in C++23 is stopping the change thatwe began with C++20, mere moments ago if counting by adoption time. Itprimarily argued that it's an inconvenient change, and that some ofthe audience would just not cooperate with WG21's indicated direction,so WG21 should compromise the technical consistency of the Standard sothey could continue to not cooperate.
The paper did not bring new information on the technical merits of thecase, and net the result of applying it was a technically dissonantStandard specification --- a strictly worse specification thanC++20. Bitwise compound operations are not special for any technicalreason, they are only special because making them special shields somefrom deprecation diagnostics.
EWG 2022-11-07
Contrary to the direction desired in the NB comment, EWG resolvedto un-deprecate all volatile compound assignments.
Proposed resolution (approved by CWG 2022-11-08):
Change in 7.6.19 [expr.assign] paragraph 6 as follows:
The behavior of an expression of the form E1 op= E2 is equivalent toE1 = E1 op E2 except that E1 is evaluated only once.[ Note: The object designated by E1 is accessed twice. -- end note ]Such expressionsare deprecated if E1 has volatile-qualified type and op is not one ofthe bitwise operators |, &, ^; see D.5.
Change in D.4 [depr.volatile.type] paragraph 2 as follows:
brachiosaur += neck; //deprecatedOKbrachiosaur = brachiosaur + neck; // OKbrachiosaur |= neck; // OK, bitwise compound expression