Title
Deprecation of volatile operands and unevaluated contexts
Status
c++20
Section
7.6.19 [expr.ass]
Submitter
Mike Miller

Created on 2019-08-14.00:00:00 last changed 48 months ago

Messages

Date: 2019-10-15.00:00:00

Proposed resolution (October, 2019):

Change 7.6.19 [expr.ass] paragraph 5 as follows:

A simple assignment whose left operand is of a volatile-qualified type is deprecated (D.4 [depr.volatile.type]) unless the (possibly parenthesized) assignment is either a discarded-value expression or appears in an unevaluated context operand.
Date: 2019-08-15.00:00:00

Notes from the August, 2019 teleconference:

The omission of those operators was intentional; the deprecation is intended only to affect cases where using the result of the operation would result in a subsequent fetch of the value. However, some shortcomings of the existing wording were noted and will be addressed in the resolution.

Date: 2019-11-15.00:00:00

[Adopted as a DR at the November, 2019 meeting.]

According to 7.6.19 [expr.ass] paragraph 7,

A simple assignment whose left operand is of a volatile -qualified non-class type is deprecated (D.4 [depr.volatile.type]) unless the assignment is either a discarded-value expression or appears in an unevaluated context.

The deprecations of increment, decrement, and compound assignment operators do not, but presumably should, mention unevaluated contexts.

History
Date User Action Args
2020-12-15 00:00:00adminsetmessages: + msg6445
2020-12-15 00:00:00adminsetmessages: + msg6444
2019-08-14 00:00:00admincreate