[Bug c++/35101] New: Const object creation with mutable field
The following code causes compile error, but this is an example of the standard. struct S{ mutable int i; }; const S cs; -- Summary: Const object creation with mutable field Product: gcc Version: 4.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tatraian at inf dot elte dot hu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35101
[Bug c++/35101] Const object creation with mutable field
--- Comment #2 from tatraian at inf dot elte dot hu 2008-02-06 13:43 --- The example is in the section: [expr.mptr.oper] But, if the stadnadr code examples can contain errors maybe this is one of them. The whole example is the next: 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 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35101