From cppreference.com
This header is part of the
library.
Types
Defined in namespace std::contracts
(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)
(C++26)
the type holding the contract-violation information
(class)
Functions
Defined in namespace std::contracts
invoke_default_contract_violation_handler
(C++26)
invokes the default contract-violation handler
(function)
Synopsis
// all freestandingnamespacestd::contracts{enumclassassertion_kind:/* unspecified */{pre=1,post=2,assert=3};enumclassevaluation_semantic:/* unspecified */{ignore=1,observe=2,enforce=3,quick_enforce=4};enumclassdetection_mode:/* unspecified */{predicate_false=1,evaluation_exception=2};classcontract_violation;voidinvoke_default_contract_violation_handler(constcontract_violation&);}Class std::contracts::contract_violation
namespacestd::contracts{classcontract_violation{// no user-accessible constructorpublic:contract_violation(constcontract_violation&)=delete;contract_violation&operator=(constcontract_violation&)=delete;/* see description */~contract_violation();constchar*comment()constnoexcept;contracts::detection_modedetection_mode()constnoexcept;boolis_terminating()constnoexcept;assertion_kindkind()constnoexcept;source_locationlocation()constnoexcept;evaluation_semanticsemantic()constnoexcept;};}