Spec-Zone.ru › C++

std::contracts::detection_mode

Defined in header <contracts>
enum class detection_mode : /* unspecified */ {
    predicate_false = 1,
    evaluation_exception = 2
};
(since C++26)

The enumerators of std::contracts::detection_mode correspond to the reasons that cause the contract violation to happen under a context that is not manifestly constant-evaluated, with meanings listed below:

Enumerator Meaning
predicate_false the contract violation occurs because the result of the predicate is false
evaluation_exception the contract violation occurs because the evaluation of the predicate exits via an exception

Notes

If a contract violation occurs in a context that is manifestly constant-evaluated, the contract-violation handler is not invoked.

See also

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)

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

Spec-Zone.ru

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