That's only one aspect of the problem? the other side of the coin is that you'd like the qualifier to turtle down your collection. Right now,

const(Collection!T) is different from const(Collection!(const(T))) .

Back to your problem, the only I see to write that in a way the compiler won't bite you later is to get a reference to the field (refcount of allocator) cast the qualifier of that reference, and then manipulating it.

Everything need to go through the casted reference. If you drop it and get it back again, the compiler may assume thing you don't want it to assume.

Reply via email to