3 ms·
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 inva
by gblargg 1y ago
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.