Summary: Call const or immutable member functions from class
--- Comment #0 from Taco <full.de...@gmail.com> 2011-12-29 06:17:44 PST ---
The following code yields an error:
int f() const
assert (f() == 5);
"Error: cannot call public/export function f from invariant"
Why? f() is const and cannot change the state of an instance of A. Invariant
checks are redundant around const/immutable public member functions.
What if 'this' was passed to the member function?
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------