On 31.01.2013 21:55, Rainer Schuetze wrote:


On 31.01.2013 21:48, Steven Schveighoffer wrote:
On Thu, 31 Jan 2013 15:32:23 -0500, Rainer Schuetze <[email protected]>
wrote:

- how do you reference count immutable containers? You'll have to cast
the payload to mutable and assume it is not in read-only memory.

The reference count part is not immutable.

e.g.:

struct refcountstruct
{
    int count;
    immutable(containerimpl) impl;
}

What about immutable(refcountstruct)? Maybe only implicitely as field of
an immutable class.


That would probably be better immutable(refcountstruct*) as field of the immutable container struct.

Reply via email to