22<feed xmlns =" http://www.w3.org/2005/Atom" >
33 <title >cpprefjp - C++日本語リファレンス</title >
44 <link href =" https://cpprefjp.github.io" />
5- <updated >2025-04-25T04:55:07.403454 </updated >
6- <id >92024ad1-e795-49f3-98d0-ca2adc46d6e7 </id >
5+ <updated >2025-04-25T05:23:56.964476 </updated >
6+ <id >6addb153-c535-4f02-ac07-32f9dff60486 </id >
77
88
9+ <entry >
10+ <title >contracts -- reference/contracts.md,reference/contracts/contract_violation.md: Fixed link</title >
11+ <link href =" https://cpprefjp.github.io/reference/contracts.html" />
12+ <id >d3947782d4c569e5a4399959ce8b8ab8e34f61a9:reference/contracts.md</id >
13+ <updated >2025-04-25T14:20:09+09:00</updated >
14+
15+ <content type =" html" >< div class=" header">& lt;contracts& gt;< /div>< h1 itemprop=" name">< span class=" token"> contracts< /span>< span class=" cpp cpp26" title=" C++26で追加"> (C++26)< /span>< /h1>
16+ < div itemprop=" articleBody">< p>< code>& lt;contracts& gt;< /code> ヘッダでは、< a href=" ../lang/cpp26/contracts.html"> 契約違反< /a> のハンドリングのための機能を定義する。< /p>
17+ < table border=" 1" bordercolor=" #888" style=" border-collapse:collapse">
18+ < thead>
19+ < tr>
20+ < th> 名前< /th>
21+ < th> 説明< /th>
22+ < th> 対応バージョン< /th>
23+ < /tr>
24+ < /thead>
25+ < tbody>
26+ < tr>
27+ < td>< code>< a href=" contracts/contract_violation.html"> contract_violation< /a>< /code>< /td>
28+ < td> 契約違反に関する情報 (class)< /td>
29+ < td> C++26< /td>
30+ < /tr>
31+ < /tbody>
32+ < /table>
33+ < h2> バージョン< /h2>
34+ < h3> 言語< /h3>
35+ < ul>
36+ < li> C++26< /li>
37+ < /ul>
38+ < h3> 処理系< /h3>
39+ < ul>
40+ < li>< a href=" ../implementation.html#clang"> Clang< /a> : 未実装< /li>
41+ < li>< a href=" ../implementation.html#gcc"> GCC< /a> : 未実装< /li>
42+ < li>< a href=" ../implementation.html#icc"> ICC< /a> : ?< /li>
43+ < li>< a href=" ../implementation.html#visual_cpp"> Visual C++< /a> : 未実装< /li>
44+ < /ul>
45+ < h2> 関連項目< /h2>
46+ < ul>
47+ < li>< a href=" ../lang/future/contract-based_programming.html"> 契約に基づくプログラミング< /a>< /li>
48+ < li>< a href=" ../lang/cpp26/contracts.html"> 契約プログラミング< /a>< /li>
49+ < /ul>
50+ < h2> 参照< /h2>
51+ < ul>
52+ < li>< a href=" http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0542r5.html" target=" _blank"> P0542R5 Support for contract based programming in C++< /a>< /li>
53+ < /ul>< /div> </content >
54+
55+ <author >
56+ <name >rotarymars</name >
57+ 58+ </author >
59+ </entry >
60+
61+ <entry >
62+ <title >contract_violation -- reference/contracts.md,reference/contracts/contract_violation.md: Fixed link</title >
63+ <link href =" https://cpprefjp.github.io/reference/contracts/contract_violation.html" />
64+ <id >d3947782d4c569e5a4399959ce8b8ab8e34f61a9:reference/contracts/contract_violation.md</id >
65+ <updated >2025-04-25T14:20:09+09:00</updated >
66+
67+ <summary type =" html" >< pre>< code> diff --git a/reference/contracts/contract_violation.md b/reference/contracts/contract_violation.md
68+ new file mode 100644
69+ index 000000000..9d0cea8eb
70+ --- /dev/null
71+ +++ b/reference/contracts/contract_violation.md
72+ @@ -0,0 +1,61 @@
73+ +# contract_violation
74+ +* contract[meta header]
75+ +* class[meta id-type]
76+ +* std[meta namespace]
77+ +* future[meta cpp]
78+ +
79+ +```cpp
80+ +namespace std {
81+ + class contract_violation {
82+ + public:
83+ + uint_least32_t line_number() const noexcept;
84+ + string_view file_name() const noexcept;
85+ + string_view function_name() const noexcept;
86+ + string_view comment() const noexcept;
87+ + string_view assertion_level() const noexcept;
88+ + };
89+ +}
90+ +```
91+ +
92+ +## 概要
93+ +
94+ +`contract_violation`クラスは、発生した[契約違反](/lang/future/contract-based_programming.md)に関する情報を提供する。
95+ +
96+ +契約違反が発生したとき、このクラスのオブジェクトが処理系定義の方法により構築され、違反ハンドラーに渡される。
97+ +
98+ +違反ハンドラーは`void(const std::contract_violation& amp;) noexcept`または`void(const std::contract_violation& amp;)`の型を持つ関数であり、
99+ +処理系定義の方法によって指定される。
100+ +
101+ +## メンバ関数
102+ +
103+ +| 名前 | 説明 | 対応バージョン |
104+ +|-----------------|----------------|----------------|
105+ +| [`line_number`](contract_violation/line_number.md.nolink) | 契約違反が発生したソースコード上の行番号 | C++ (将来) |
106+ +| [`file_name`](contract_violation/file_name.md.nolink) | 契約違反が発生したソースコードのファイル名 | C++ (将来) |
107+ +| [`function_name`](contract_violation/function_name.md.nolink) | 契約違反が発生した関数の名前 | C++ (将来) |
108+ +| [`comment`](contract_violation/comment.md.nolink) | 契約違反の原因となった述語を説明する処理系定義のテキスト | C++ (将来) |
109+ +| [`assertion_level`](contract_violation/assertion_level.md.nolink) | 違反した契約のアサーションレベル | C++ (将来) |
110+ +
111+ +
112+ +## 例
113+ +(執筆中)
114+ +
115+ +### 出力
116+ +(執筆中)
117+ +
118+ +## バージョン
119+ +### 言語
120+ +- C++ (将来)
121+ +
122+ +### 処理系
123+ +- [Clang](/implementation.md#clang): 未実装
124+ +- [GCC](/implementation.md#gcc): 未実装
125+ +- [ICC](/implementation.md#icc): ?
126+ +- [Visual C++](/implementation.md#visual_cpp): 未実装
127+ +
128+ +## 関連項目
129+ +- [契約に基づくプログラミング](/lang/future/contract-based_programming.md)
130+ +
131+ +## 参照
132+ +- [P0542R5 Support for contract based programming in C++](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0542r5.html)
133+ +- [P0788R3 Standard Library Specification in a Concepts and Contracts World](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0788r3.pdf)
134+ < /code>< /pre> </summary >
135+
136+ <author >
137+ <name >rotarymars</name >
138+ 139+ </author >
140+ </entry >
141+
9142 <entry >
10143 <title >C++ (将来) -- lang/future.md: Fixed typo</title >
11144 <link href =" https://cpprefjp.github.io/lang/future.html" />
@@ -1115,76 +1248,4 @@ index 600ee1eff..de6d1bee6 100644
11151248 </author >
11161249 </entry >
11171250
1118- <entry >
1119- <title >INT_FAST64_MIN -- reference/cstdint/int_fast64_min.md: Created sample program</title >
1120- <link href =" https://cpprefjp.github.io/reference/cstdint/int_fast64_min.html" />
1121- <id >c476d9c300d2e3d7a7bff81733057a31a33a037e:reference/cstdint/int_fast64_min.md</id >
1122- <updated >2025-04-25T12:09:26+09:00</updated >
1123-
1124- <summary type =" html" >< pre>< code> diff --git a/reference/cstdint/int_fast64_min.md b/reference/cstdint/int_fast64_min.md
1125- index 0131bce40..54a861717 100644
1126- --- a/reference/cstdint/int_fast64_min.md
1127- +++ b/reference/cstdint/int_fast64_min.md
1128- @@ -8,7 +8,52 @@
1129- ```
1130-
1131- ## 概要
1132- -[`int_fast64_t`](int_fast64_t.md) の最小値。
1133- +[`int_fast64_t`](int_fast64_t.md) の最小値を表す定数。
1134- +
1135- +[`std::numeric_limits`](/reference/limits/numeric_limits.md)`& lt;int_fast64_t& gt;::`[`min()`](/reference/limits/numeric_limits/min.md) と等しい。
1136- +
1137- +## 例
1138- +```cpp example
1139- +#include & lt;iostream& gt;
1140- +#include & lt;cstdint& gt;
1141- +#include & lt;limits& gt;
1142- +
1143- +int main()
1144- +{
1145- + std::cout & lt;& lt; & #34;INT_FAST64_MIN: & #34; & lt;& lt; INT_FAST64_MIN & lt;& lt; std::endl;
1146- +
1147- + // numeric_limitsによる値と一致することを確認
1148- + std::cout & lt;& lt; & #34;numeric_limits& lt;int_fast64_t& gt;::min(): & #34;
1149- + & lt;& lt; std::numeric_limits& lt;std::int_fast64_t& gt;::min() & lt;& lt; std::endl;
1150- +
1151- + std::cout & lt;& lt; & #34;INT_FAST64_MIN == numeric_limits& lt;int_fast64_t& gt;::min(): & #34;
1152- + & lt;& lt; std::boolalpha
1153- + & lt;& lt; (INT_FAST64_MIN == std::numeric_limits& lt;std::int_fast64_t& gt;::min()) & lt;& lt; std::endl;
1154- +
1155- + // 型の確認
1156- + std::int_fast64_t min_value = INT_FAST64_MIN;
1157- + std::cout & lt;& lt; & #34;型を通したときの値: & #34; & lt;& lt; min_value & lt;& lt; std::endl;
1158- +
1159- + // アンダーフローの確認
1160- + std::int_fast64_t value = INT_FAST64_MIN;
1161- + std::cout & lt;& lt; & #34;INT_FAST64_MIN: & #34; & lt;& lt; value & lt;& lt; std::endl;
1162- + std::cout & lt;& lt; & #34;INT_FAST64_MIN - 1: & #34; & lt;& lt; value - 1 & lt;& lt; std::endl;
1163- +
1164- + return 0;
1165- +}
1166- +```
1167- +
1168- +### 出力例
1169- +```
1170- +INT_FAST64_MIN: -9223372036854775808
1171- +numeric_limits& lt;int_fast64_t& gt;::min(): -9223372036854775808
1172- +INT_FAST64_MIN == numeric_limits& lt;int_fast64_t& gt;::min(): true
1173- +型を通したときの値: -9223372036854775808
1174- +INT_FAST64_MIN: -9223372036854775808
1175- +INT_FAST64_MIN - 1: 9223372036854775807
1176- +```
1177- +
1178- +この出力例は処理系によって異なる場合がある。特に、`int_fast64_t`の実際の型が処理系によって異なる可能性があるため、最小値やアンダーフロー動作も異なることがある。
1179-
1180- ## バージョン
1181- ### 言語
1182- < /code>< /pre> </summary >
1183-
1184- <author >
1185- <name >rotarymars</name >
1186- 1187- </author >
1188- </entry >
1189-
11901251</feed >
0 commit comments