On 7/10/12 7:10 PM, Walter Bright wrote:
PIMPL means pointer to implementation. Your const struct is just a
wrapper around a pointer, and that pointer can be cast to mutable before
calling member functions on it.

Or:

bool opEquals(const Object p) const
{
Object q = cast() p;
Object r = cast() this;
return r.non_const_equals(q);
}

Of course, you'd have to make this @trusted.

s/make this @trusted/never use this/

Andrei

Reply via email to