This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 110b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2023-01-15


1799. mutable and non-explicit const qualification

Section: 9.2.2  [dcl.stc]     Status: CD4     Submitter: Richard Smith     Date: 2013-10-21

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

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.

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:...

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:...