draw_rectangle(p,Size{10,20}); // one corner and a (height,width) pair
@ -1104,7 +1104,7 @@ We don't need to mentioning it for each member function.
**Note**: `Expects()` can also be used to check a condition in the middle of an algorithm.
**Enforcement**: (Not enforceable) Finding the variety of ways preconditions can be asserted is not feasible. Warning about those that can be easily identfied (assert()) has questionable value in the absence of a language facility.
**Enforcement**: (Not enforceable) Finding the variety of ways preconditions can be asserted is not feasible. Warning about those that can be easily identified (assert()) has questionable value in the absence of a language facility.
<aname="Ri-post"></a>
@ -1207,7 +1207,7 @@ Postconditions related only to internal state belongs in the definition/implemen
Ideally, that `Ensured` should be part of the interface that's not easily done. For now, we place it in the definition (function body).
**Enforcement**: (Not enforceable) Finding the variety of ways postconditions can be asserted is not feasible. Warning about those that can be easily identfied (assert()) has questionable value in the absence of a language facility.
**Enforcement**: (Not enforceable) Finding the variety of ways postconditions can be asserted is not feasible. Warning about those that can be easily identified (assert()) has questionable value in the absence of a language facility.
<aname="Ri-concepts"></a>
@ -1250,7 +1250,7 @@ An error means that the function cannot achieve its advertised purpose (includin
Calling code that ignores the error could lead to wrong results or undefined systems state.
For example, not being able to connect to a remote server is not by itself an error:
the server can refuse a connection for all kinds of reasons, so the natural thing is to return a result that the caller always has to check.
However, if failing to make a connection is considerd an error, then a failure should throw an exception.
However, if failing to make a connection is considered an error, then a failure should throw an exception.
**Exception**: Many traditional interface functions (e.g., UNIX signal handlers) use error codes (e.g., `errno`) to report what are really status codes, rather than errors. You don't have good alternative to using such, so calling these does not violate the rule.