--- Comment #1 from Stewart Gordon <> 2012-05-15 07:47:50 PDT ---
An inner class holds a hidden member that is a reference to the object of the
outer class to which it belongs.  By transitivity, if inner is const or
immutable, then outer must be likewise from inner's point of view.

This implies that an immutable inner can only belong to an immutable outer, and
a const inner can belong to a mutable, const or immutable outer, but inner will
always view the outer as const.

At the moment there doesn't seem to be a way to explicitly set the constancy of
Inner.outer.  But if there were, it would enable a mutable inner to belong to
an outer of any constancy while ensuring const-safety (though the outer class
might not be able to hold a reference to the inner object).

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to