Skip to content

Commit 7d39e0d

Browse files
author
cpprefjp-autoupdate
committed
update automatically
1 parent c3b88f4 commit 7d39e0d

File tree

1 file changed

+2
-109
lines changed

1 file changed

+2
-109
lines changed

rss.xml

Lines changed: 2 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<feed xmlns="http://www.w3.org/2005/Atom">
33
<title>cpprefjp - C++日本語リファレンス</title>
44
<link href="https://cpprefjp.github.io" />
5-
<updated>2026-01-05T04:18:03.147567</updated>
6-
<id>b6cc3fed-90db-4418-a62c-3bebdbbb5257</id>
5+
<updated>2026-01-05T08:21:40.554544</updated>
6+
<id>659a66c5-8b88-477c-baa1-e89c7eea768e</id>
77

88

99
<entry>
@@ -113,113 +113,6 @@ index 8525d9614..c4e11228a 100644
113113

114114
## 例
115115

116-
&lt;/code&gt;&lt;/pre&gt;</summary>
117-
118-
<author>
119-
<name>Akira Takahashi</name>
120-
<email>[email protected]</email>
121-
</author>
122-
</entry>
123-
124-
<entry>
125-
<title>stdexcept -- Merge pull request #1550 from KaiTomotake/add-logic_error</title>
126-
<link href="https://cpprefjp.github.io/reference/stdexcept.html"/>
127-
<id>b43c7b10c14419657757df6a69bd56680e6a0a29:reference/stdexcept.md</id>
128-
<updated>2026-01-05T11:41:30+09:00</updated>
129-
130-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/stdexcept.md b/reference/stdexcept.md
131-
index 2074a51a5..6a75c204e 100644
132-
--- a/reference/stdexcept.md
133-
+++ b/reference/stdexcept.md
134-
@@ -13,7 +13,7 @@
135-
136-
| 名前 | 説明 | 対応バージョン |
137-
|--------------------|--------------------------------------------|-------|
138-
-| `logic_error` | プログラムの実行前に検出可能なエラー(論理エラー)を示す | |
139-
+| [`logic_error`](./stdexcept/logic_error.md) | プログラムの実行前に検出可能なエラー(論理エラー)を示す | |
140-
| `domain_error` | 定義域エラーを示す | |
141-
| `invalid_argument` | 不正な引数を示す | |
142-
| `length_error` | 長すぎるオブジェクトを作ろうとしたことを示す | |
143-
@@ -26,7 +26,7 @@
144-
例外クラスには継承関係があり、以下の箇条書きの階層構造で示す。
145-
146-
- [`exception`](/reference/exception/exception.md)
147-
- - `logic_error`
148-
+ - [`logic_error`](./stdexcept/logic_error.md)
149-
- `domain_error`
150-
- `invalid_argument`
151-
- `length_error`
152-
&lt;/code&gt;&lt;/pre&gt;</summary>
153-
154-
<author>
155-
<name>Akira Takahashi</name>
156-
<email>[email protected]</email>
157-
</author>
158-
</entry>
159-
160-
<entry>
161-
<title>logic_error -- Merge pull request #1550 from KaiTomotake/add-logic_error</title>
162-
<link href="https://cpprefjp.github.io/reference/stdexcept/logic_error.html"/>
163-
<id>b43c7b10c14419657757df6a69bd56680e6a0a29:reference/stdexcept/logic_error.md</id>
164-
<updated>2026-01-05T11:41:30+09:00</updated>
165-
166-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/stdexcept/logic_error.md b/reference/stdexcept/logic_error.md
167-
new file mode 100644
168-
index 000000000..8525d9614
169-
--- /dev/null
170-
+++ b/reference/stdexcept/logic_error.md
171-
@@ -0,0 +1,51 @@
172-
+# logic_error
173-
+
174-
+* stdexcept[meta header]
175-
+* class[meta id-type]
176-
+* std[meta namespace]
177-
+
178-
+```cpp
179-
+namespace std {
180-
+ class logic_error : public exception;
181-
+}
182-
+```
183-
+
184-
+## 概要
185-
+
186-
+`logic_error`クラスはプログラムの実行前に検出可能なエラー(論理エラー)を通知するためにスローされる例外クラス全般に対する基底クラスである。
187-
+
188-
+## メンバ関数
189-
+
190-
+| 名前 | 説明 | 対応バージョン |
191-
+| --- | --- | --- |
192-
+| `(constructor)` | コンストラクタ | |
193-
+| `(destructor)` | デストラクタ | |
194-
+| `operator=` | 代入演算子 | |
195-
+| `what` | エラー理由を取得する | |
196-
+
197-
+## 例
198-
+
199-
+```cpp example
200-
+#include &amp;lt;stdexcept&amp;gt;
201-
+#include &amp;lt;iostream&amp;gt;
202-
+
203-
+int square_root(int num) {
204-
+ if (num &amp;lt; 0) {
205-
+ throw std::invalid_argument(&amp;#34;Cannot perform calculations with negative numbers!&amp;#34;)
206-
+ }
207-
+ return num * num;
208-
+}
209-
+
210-
+int main() {
211-
+ try {
212-
+ square_root(-5);
213-
+ } catch (const std::logic_error&amp;amp; e) {
214-
+ std::cerr &amp;lt;&amp;lt; &amp;#34;Error: &amp;#34; &amp;lt;&amp;lt; e.what() &amp;lt;&amp;lt; &amp;#34;\n&amp;#34;;
215-
+ }
216-
+}
217-
+```
218-
+
219-
+### 出力
220-
+
221-
+```
222-
+```
223116
&lt;/code&gt;&lt;/pre&gt;</summary>
224117

225118
<author>

0 commit comments

Comments
 (0)