Skip to content

Commit 4d20abb

Browse files
author
cpprefjp-autoupdate
committed
update automatically
1 parent 741bccb commit 4d20abb

File tree

3 files changed

+36
-35
lines changed

3 files changed

+36
-35
lines changed

reference/stdexcept/logic_error.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969
</head>
7070
<body>
71-
<header data-kunai-mdinfo="{&#34;meta&#34;: {&#34;header&#34;: [&#34;stdexcept&#34;], &#34;id-type&#34;: [&#34;class&#34;], &#34;namespace&#34;: [&#34;std&#34;]}, &#34;sources&#34;: [{&#34;id&#34;: &#34;4872d8eeed329fc2ab85ab735c6782d90d8126fd&#34;, &#34;source&#34;: &#34;#include &lt;stdexcept&gt;\n#include &lt;iostream&gt;\n\nint square_root(int num) {\n if (num &lt; 0) {\n throw std::invalid_argument(\&#34;Cannot perform calculations with negative numbers!\&#34;)\n }\n return num * num;\n}\n\nint main() {\n try {\n square_root(-5);\n } catch (const std::logic_error&amp; e) {\n std::cerr &lt;&lt; \&#34;Error: \&#34; &lt;&lt; e.what() &lt;&lt; \&#34;\\n\&#34;;\n }\n}\n&#34;}], &#34;page_id&#34;: [&#34;reference&#34;, &#34;stdexcept&#34;, &#34;logic_error&#34;]}">
71+
<header data-kunai-mdinfo="{&#34;meta&#34;: {&#34;header&#34;: [&#34;stdexcept&#34;], &#34;id-type&#34;: [&#34;class&#34;], &#34;namespace&#34;: [&#34;std&#34;]}, &#34;sources&#34;: [{&#34;id&#34;: &#34;9ddb9550cc78b6f640ceff5ff7941f1a3140ad44&#34;, &#34;source&#34;: &#34;#include &lt;stdexcept&gt;\n#include &lt;iostream&gt;\n\nint square_root(int num) {\n if (num &lt; 0) {\n throw std::invalid_argument(\&#34;Cannot perform calculations with negative numbers!\&#34;);\n }\n return num * num;\n}\n\nint main() {\n try {\n square_root(-5);\n } catch (const std::logic_error&amp; e) {\n std::cerr &lt;&lt; \&#34;Error: \&#34; &lt;&lt; e.what() &lt;&lt; \&#34;\\n\&#34;;\n }\n}\n&#34;}], &#34;page_id&#34;: [&#34;reference&#34;, &#34;stdexcept&#34;, &#34;logic_error&#34;]}">
7272
<nav class="navbar navbar-default" role="navigation">
7373
<div class="container-fluid">
7474
<div class="navbar-header">
@@ -188,12 +188,12 @@
188188

189189
<p class="text-right"><small>
190190
最終更新日時(UTC):
191-
<span itemprop="datePublished" content="2026-01-06T03:47:59">
192-
2026年01月06日 03時47分59秒
191+
<span itemprop="datePublished" content="2026-01-08T12:52:39">
192+
2026年01月08日 12時52分39秒
193193
</span>
194194
<br/>
195195
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
196-
<span itemprop="name">Koichi Murase</span>
196+
<span itemprop="name">Raclamusi</span>
197197
</span>
198198
が更新
199199
</small></p>
@@ -253,12 +253,12 @@ <h2>メンバ関数</h2>
253253
</tbody>
254254
</table>
255255
<h2></h2>
256-
<p><div class="yata" id="4872d8eeed329fc2ab85ab735c6782d90d8126fd"><div class="codehilite"><pre><span></span><code><span class="cp">#include</span> <span class="cpf"><a href="../stdexcept.html">&lt;stdexcept&gt;</a></span><span class="cp"></span>
256+
<p><div class="yata" id="9ddb9550cc78b6f640ceff5ff7941f1a3140ad44"><div class="codehilite"><pre><span></span><code><span class="cp">#include</span> <span class="cpf"><a href="../stdexcept.html">&lt;stdexcept&gt;</a></span><span class="cp"></span>
257257
<span class="cp">#include</span> <span class="cpf"><a href="../iostream.html">&lt;iostream&gt;</a></span><span class="cp"></span>
258258

259259
<span class="kt">int</span> <span class="nf">square_root</span><span class="p">(</span><span class="kt">int</span> <span class="n">num</span><span class="p">)</span> <span class="p">{</span>
260260
<span class="k">if</span> <span class="p">(</span><span class="n">num</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
261-
<span class="k">throw</span> <span class="n">std</span><span class="o">::</span><span class="n">invalid_argument</span><span class="p">(</span><span class="s">"Cannot perform calculations with negative numbers!"</span><span class="p">)</span>
261+
<span class="k">throw</span> <span class="n">std</span><span class="o">::</span><span class="n">invalid_argument</span><span class="p">(</span><span class="s">"Cannot perform calculations with negative numbers!"</span><span class="p">);</span>
262262
<span class="p">}</span>
263263
<span class="k">return</span> <span class="n">num</span> <span class="o">*</span> <span class="n">num</span><span class="p">;</span>
264264
<span class="p">}</span>

rss.xml

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,37 @@
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-08T11:55:08.059345</updated>
6-
<id>dc72a2b0-ff13-41e3-a180-d4bfae56d4ef</id>
5+
<updated>2026-01-08T13:24:03.188544</updated>
6+
<id>9a60ee9f-19c7-4279-9eb6-068c768f0cca</id>
77

88

9+
<entry>
10+
<title>logic_error -- logic_error : コンパイルエラーを修正</title>
11+
<link href="https://cpprefjp.github.io/reference/stdexcept/logic_error.html"/>
12+
<id>62d4905bc289539e412e9447f6d1284fed14f918:reference/stdexcept/logic_error.md</id>
13+
<updated>2026-01-08T21:52:39+09:00</updated>
14+
15+
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/stdexcept/logic_error.md b/reference/stdexcept/logic_error.md
16+
index fd4063680..f63d0f109 100644
17+
--- a/reference/stdexcept/logic_error.md
18+
+++ b/reference/stdexcept/logic_error.md
19+
@@ -31,7 +31,7 @@ namespace std {
20+
21+
int square_root(int num) {
22+
if (num &amp;lt; 0) {
23+
- throw std::invalid_argument(&amp;#34;Cannot perform calculations with negative numbers!&amp;#34;)
24+
+ throw std::invalid_argument(&amp;#34;Cannot perform calculations with negative numbers!&amp;#34;);
25+
}
26+
return num * num;
27+
}
28+
&lt;/code&gt;&lt;/pre&gt;</summary>
29+
30+
<author>
31+
<name>Raclamusi</name>
32+
<email>raclamusi@gmail.com</email>
33+
</author>
34+
</entry>
35+
936
<entry>
1037
<title>SI接頭辞 -- ratio/si_prefix: meta aliasタグ追加(#1545)</title>
1138
<link href="https://cpprefjp.github.io/reference/ratio/si_prefix.html"/>
@@ -656,30 +683,4 @@ index 48fda8af9..f882c46f2 100644
656683
</author>
657684
</entry>
658685

659-
<entry>
660-
<title>counting_semaphore -- semaphore/counting_semaphore: meta aliasタグ追加(#1545)</title>
661-
<link href="https://cpprefjp.github.io/reference/semaphore/counting_semaphore.html"/>
662-
<id>409e69d74025e49ac0dfea88190c3ff48fa1d402:reference/semaphore/counting_semaphore.md</id>
663-
<updated>2026-01-08T20:26:22+09:00</updated>
664-
665-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/semaphore/counting_semaphore.md b/reference/semaphore/counting_semaphore.md
666-
index 03558e00b..d2cd7bb2c 100644
667-
--- a/reference/semaphore/counting_semaphore.md
668-
+++ b/reference/semaphore/counting_semaphore.md
669-
@@ -3,6 +3,7 @@
670-
* class template[meta id-type]
671-
* std[meta namespace]
672-
* cpp20[meta cpp]
673-
+* binary_semaphore[meta alias]
674-
675-
```cpp
676-
namespace std {
677-
&lt;/code&gt;&lt;/pre&gt;</summary>
678-
679-
<author>
680-
<name>yoh</name>
681-
<email>kawasaki.liamg@gmail.com</email>
682-
</author>
683-
</entry>
684-
685686
</feed>

sitemap.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29501,7 +29501,7 @@
2950129501

2950229502
<url>
2950329503
<loc>https://cpprefjp.github.io/reference/stdexcept/logic_error.html</loc>
29504-
<lastmod>2026-01-07T22:38:55+09:00</lastmod>
29504+
<lastmod>2026-01-08T21:52:39+09:00</lastmod>
2950529505
<changefreq>daily</changefreq>
2950629506
<priority>0.7</priority>
2950729507
</url>

0 commit comments

Comments
 (0)