namespace std::contracts {
class contract_violation;
}
contract_violation型は、実行時に発生した契約違反がhandle_contract_violation関数に渡されるために使用される型である。
この型は、ユーザーによって構築、コピー、ムーブ、変更してはならない。
メンバ関数
| 名前 | 説明 | 対応バージョン |
|---|---|---|
comment |
契約違反の詳細を記録したchar列を返す | C++26 |
detection_mode |
契約違反が特定された方法を返す | C++26 |
is_terminating |
契約違反によってプログラムがターミネートされるかを返す | C++26 |
kind |
違反した契約の種類 | C++26 |
location |
契約違反が発生したソースコードの位置 | C++26 |
semantic |
契約の評価方法 | C++26 |
バージョン
言語
- C++26
処理系
- Clang: ??
- GCC: ??
- Visual C++: ??
参照
- Contracts for C++
- P3819R0 Remove
evaluation_exception()from contract-violation handling- 導入予定だった
evaluation_exception()メンバ関数を削除する提案
- 導入予定だった