Title
Cv-qualification of arithmetic types and deprecation of volatile
Status
drafting
Section
6.8.2 [basic.fundamental]
Submitter
Alisdair Meredith

Created on 2020-03-23.00:00:00 last changed 6 months ago

Messages

Date: 2020-07-15.00:00:00

Notes from the July, 2020 teleconference:

CWG felt that no changes should be made to 12.5 [over.built].

Date: 2020-03-23.00:00:00

According to the definitions in 6.8.2 [basic.fundamental], the arithmetic types include only the non-cv-qualified versions. In the taxonomy of fundamental types, the first mention of “cv-qualified versions of these types” is for scalar types (6.8 [basic.types] paragraph 9). However, 7.6.1.6 [expr.post.incr] paragraph 1 and 7.6.2.3 [expr.pre.incr] paragraph 1 both say:

The type of the operand shall be an arithmetic type other than cv bool, or...

which is a contradiction, since cv-qualified bool is not an arithmetic type. Similarly, 7.6.19 [expr.ass] paragraph 6 requires an arithmetic type for += and -=. D.6 [depr.volatile.type] deprecates the increment and decrement operators when applied to volatile-qualified arithmetic types, but the wording already made those ill-formed (since the normative wording requires an arithmetic type and not a possibly cv-qualified version thereof).

A related question is whether 12.5 [over.built], which explicitly allows for cv-qualified arithmetic types, should also note the deprecation.

See also issue 2185.

History
Date User Action Args
2020-12-15 00:00:00adminsetmessages: + msg6232
2020-03-23 00:00:00admincreate