Skip to content

Commit 91bc83e

Browse files
committed
new: New page detection_mode
1 parent b8c7c50 commit 91bc83e

2 files changed

Lines changed: 42 additions & 1 deletion

File tree

reference/contracts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
|------|------|----------------|
1313
| [`assertion_kind`](contracts/assertion_kind.md) | アサーションの種類 (enum) | C++26 |
1414
| [`evaluation_semantic`](contracts/evaluation_semantic.md) | アサーションの評価の種類(enum) | C++26 |
15-
| [`detection_mode`](contracts/detection_mode.md.nolink) | 契約違反の検出モード(enum) | C++26 |
15+
| [`detection_mode`](contracts/detection_mode.md) | 契約違反の検出モード(enum) | C++26 |
1616
| [`contract_violation`](contracts/contract_violation.md) | 契約違反に関する情報 (class) | C++26 |
1717
| [`invoke_default_contract_violation_handler`](contracts/invoke_default_contract_violation_handler.md.nolink) | デフォルトcontract_violationハンドラー | C++26 |
1818

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# detection_mode
2+
* contracts[meta header]
3+
* std::contracts[meta namespace]
4+
* enum[meta id-type]
5+
* cpp26[meta cpp]
6+
7+
```cpp
8+
namespace std::contracts {
9+
enum class detection_mode : unspecified {
10+
predicate_false = 1,
11+
evaluation_exception = 2
12+
}
13+
}
14+
```
15+
16+
## 概要
17+
契約違反がどのような仕組みでその違反が認識されたかを表す列挙型。
18+
19+
### 各列挙子の意味
20+
| 列挙子 | 値 | 意味 |
21+
|--------|-----|------|
22+
| predicate_false | 1 | 契約の述語が評価され、falseを返す、もしくは評価をするとfalseを返す |
23+
| evaluation_exception | 2 | 評価中に例外が投げられ、キャッチされずに逸脱した |
24+
25+
## バージョン
26+
### 言語
27+
- C++26
28+
29+
### 処理系
30+
- [Clang](/implementation.md#clang): ?
31+
- [GCC](/implementation.md#gcc): ?
32+
- [ICC](/implementation.md#icc): ?
33+
- [Visual C++](/implementation.md#visual_cpp): ?
34+
35+
## 関連項目
36+
- [契約に基づくプログラミング](/lang/future/contract-based_programming.md)
37+
- [契約プログラミング](/lang/cpp26/contracts.md)
38+
39+
## 参照
40+
- [P0542R5 Support for contract based programming in C++](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0542r5.html)
41+

0 commit comments

Comments
 (0)