@@ -235,7 +235,8 @@ strings, or be left undefined, in which case it defaults to `verbose`.
235235 use, but can be useful for measuring the overall performance impact
236236 of checking in a program.
237237
238- - `ADOBE_CONTRACT_VIOLATION=custom_verbose`: When a contract violation is detected, a custom handler
238+ - `ADOBE_CONTRACT_VIOLATION=custom_verbose`: When a contract violation is detected, a custom
239+ verbose handler
239240 is invoked. The client must define the handler in the `adobe` namespace with the signature:
240241
241242 ```cpp
@@ -253,7 +254,7 @@ strings, or be left undefined, in which case it defaults to `verbose`.
253254 application, and must not return to its caller.
254255
255256- ` ADOBE_CONTRACT_VIOLATION=custom_lightweight ` : When a contract violation is detected, a custom
256- handler is invoked. The client must define the handler in the ` adobe ` namespace with the signature:
257+ lightweight handler is invoked. The client must define the handler in the ` adobe ` namespace with the signature:
257258
258259 ``` cpp
259260 [[noreturn]] void ::adobe::contract_violated_lightweight () {
@@ -263,7 +264,6 @@ strings, or be left undefined, in which case it defaults to `verbose`.
263264
264265 The function should report the violation in a way that is appropriate for the application, and
265266 must not return to its caller.
266- function must not return.
267267
268268In `verbose` and `lightweight` modes, a failed check ultimately calls
269269[`std::terminate()`](https://en.cppreference.com/w/cpp/error/terminate)
@@ -437,6 +437,13 @@ target_link_libraries(my-executable PRIVATE adobe-contract-checks)
437437 #endif
438438 ```
439439
440+ - Include a document in your project describing standard
441+ preconditions that don't need to be specified explicitly, and that hold
442+ unless explicitly contradicted by documentation. They should
443+ still be checked, but not having to explicitly document that every
444+ `const char*` refers to a null-terminated byte string, for example, can
445+ be a big win.
446+
440447## Rationales
441448
442449### Why This Library Provides No Postcondition Check
0 commit comments