▲ | almostgotcaught 2 days ago | |
i don't get it - if do
do you think those asserts don't "run automatically"? | ||
▲ | gblargg 2 days ago | parent [-] | |
You define the invariants once for the class and they are run around every public function. Done manually you'd probably use a helper object that calls the invariants in its constructor and destructor (have to handle exceptions) that you have to add to every public function's definition. |