Created on 2005-01-03.00:00:00 last changed 196 months ago
[Voted into WP at October 2005 meeting.]
Proposed resolution (April, 2005):
Change the example in 7.6.4 [expr.mptr.oper] paragraph 5 to read as follows:
struct S { S() : i(0) { } mutable int i; }; void f() { const S cs; int S::* pm = &S::i; // pm refers to mutable member S::i cs.*pm = 88; // ill-formed: cs is a const object }
7.6.4 [expr.mptr.oper] paragraph 5 contains the following example:
struct S { mutable int i; }; const S cs; int S::* pm = &S::i; // pm refers to mutable member S::i cs.*pm = 88; // ill-formed: cs is a const object
The const object cs is not explicitly initialized, and class S does not have a user-declared default constructor. This makes the code ill-formed as per 9.4 [dcl.init] paragraph 9.
History | |||
---|---|---|---|
Date | User | Action | Args |
2008-10-05 00:00:00 | admin | set | status: wp -> cd1 |
2006-04-22 00:00:00 | admin | set | status: dr -> wp |
2005-10-22 00:00:00 | admin | set | messages: + msg1276 |
2005-10-22 00:00:00 | admin | set | status: ready -> dr |
2005-05-01 00:00:00 | admin | set | messages: + msg1137 |
2005-05-01 00:00:00 | admin | set | status: open -> ready |
2005-01-03 00:00:00 | admin | create |