Rainer Deyke wrote:
> {
> auto old_x = x;
> try {
> F();
> } finally {
> G(old_x);
> }
> }
Not 'finally', unless postconditions are checked when the function
terminates with an exception. This is closer to correct:
{
auto old_x = x;
// Preconditions go here.
F(); // <-- function body
G(old_x); // <-- postcondition
}
--
Rainer Deyke - [email protected]
