Contract support (C++26)
From cppreference.net
<
cpp
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contract support
| Contract-violation information | ||||
|
(C++26)
|
||||
|
(C++26)
|
||||
|
(C++26)
|
||||
|
(C++26)
|
||||
| Helper functions | ||||
The contract support library defines several types for reporting information about contract violations .
Contract-violation information
|
Defined in header
<contracts>
|
|
|
Defined in namespace
std::contracts
|
|
|
(C++26)
|
the type holding the contract-violation information
(class) |
|
(C++26)
|
the kind of the contract assertion violated
(enum) |
|
(C++26)
|
the evaluation semantic when the contract violation occurs
(enum) |
|
(C++26)
|
the reason that causes the contract violation
(enum) |
Helper functions
|
Defined in header
<contracts>
|
|
|
Defined in namespace
std::contracts
|
|
|
invokes the default contract-violation handler
(function) |
|
Notes
| Feature-test macro | Value | Std | Feature |
|---|---|---|---|
__cpp_lib_contracts
|
202502L
|
(C++26) | Contract support library |