How to tell how an object/class is declared
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Nov 6 15:47:24 PST 2014
On Thursday, 6 November 2014 at 23:43:19 UTC, Meta wrote:
> How can I tell at the points marked in the above code if the
> class or struct instance was declared as const, shared, etc.?
> Is this possible?
You can't do that, but you can overload on const
void doSomething() const { called on const instance }
void doSomething() { called on mutable }
More information about the Digitalmars-d-learn
mailing list