Title
mutable and non-explicit const qualification
Status
cd4
Section
9.2.2 [dcl.stc]
Submitter
Richard Smith

Created on 2014-01-20.00:00:00 last changed 86 months ago

Messages

Date: 2014-11-15.00:00:00

[Moved to DR at the November, 2014 meeting.]

Date: 2014-02-15.00:00:00

Proposed resolution (February, 2014):

Change 9.2.2 [dcl.stc] paragraph 9 as follows:

The mutable specifier can be applied shall appear only to names in the declaration of class a non-static data members member (11.4 [class.mem]) and cannot be applied to names declared const or static, and cannot be applied to reference members whose type is neither const-qualified nor a reference type. [Example:...
Date: 2014-01-15.00:00:00

Proposed resolution (January, 2014) [SUPERSEDED]:

Change 9.2.2 [dcl.stc] paragraph 9 as follows:

The mutable specifier can be applied only to names of non-static class data members (11.4 [class.mem]) and cannot be applied to names declared const or static, and cannot be applied to reference members whose type is neither const-qualified nor a reference type. [Example:...
Date: 2014-01-20.00:00:00

According to 9.2.2 [dcl.stc] paragraph 9,

The mutable specifier can be applied only to names of class data members (11.4 [class.mem]) and cannot be applied to names declared const or static, and cannot be applied to reference members.

This is similar to issue 1686 in that the restriction appears to apply only to declarations in which the const keyword appears directly. It should instead apply to members with const-qualified types, regardless of how the qualification was achieved.

History
Date User Action Args
2017-02-06 00:00:00adminsetstatus: drwp -> cd4
2015-05-25 00:00:00adminsetstatus: dr -> drwp
2015-04-13 00:00:00adminsetmessages: + msg5356
2014-11-24 00:00:00adminsetstatus: ready -> dr
2014-03-03 00:00:00adminsetmessages: + msg4819
2014-03-03 00:00:00adminsetstatus: review -> ready
2014-01-20 00:00:00adminsetmessages: + msg4742
2014-01-20 00:00:00admincreate