Congratulations to the D Team!
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue Jul 10 18:45:04 PDT 2012
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
More information about the Digitalmars-d
mailing list