Parameterize Expects1 and Ensures` by contract group
Allows independently controlling handling of different categories of bugs, such as bounds checks vs. null checks. User-extensible: Companies can instantiate their own `contract_group` objects for their own categories of contract checks, including for distinguishing contract "levels" like `Normal` vs. `Audit` by just creating those two groups that can then be controlled independently or in combination.
This commit is contained in:
1 parent
c16e4ce59f
commit
cbfd8cd734
13 files changed
+129
-124
No files matched your search
@@ -44,8 +44,8 @@ shared_ptr | ☑ | an alias to `std::shared_ptr`
|
||||
stack_array | ☐ | a stack-allocated array
|
||||
dyn_array | ☐ | a heap-allocated array
|
||||
[**3. Assertions**][cg-assertions] | |
|
||||
Expects | ☑ | a precondition assertion; on failure it terminates
|
||||
Ensures | ☑ | a postcondition assertion; on failure it terminates
|
||||
Expects | ☑ | a precondition assertion; on failure it terminates by default if no user-installed handler
|
||||
Ensures | ☑ | a postcondition assertion; on failure it terminates by default if no user-installed handler
|
||||
[**4. Utilities**][cg-utilities] | |
|
||||
move_owner | ☐ | a helper function that moves one `owner` to the other
|
||||
byte | ☑ | either an alias to std::byte or a byte type
|
||||
|
||||
Reference in new issue
Block a user