Spec-Zone.ru › C++

Contract support (C++26)

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
contract_violation
(C++26)
the type holding the contract-violation information
(class)
assertion_kind
(C++26)
the kind of the contract assertion violated
(enum)
evaluation_semantic
(C++26)
the evaluation semantic when the contract violation occurs
(enum)
detection_mode
(C++26)
the reason that causes the contract violation
(enum)

Helper functions

Defined in header <contracts>
Defined in namespace std::contracts
invoke_default_contract_violation_handler
(C++26)
invokes the default contract-violation handler
(function)

Notes

Feature-test macro Value Std Feature
__cpp_lib_contracts 202502L (C++26) Contract support library

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/contract

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API