Skip to content

Commit a061408

Browse files
author
cpprefjp-autoupdate
committed
update automatically
1 parent 3d4315e commit a061408

File tree

3 files changed

+34
-202
lines changed

3 files changed

+34
-202
lines changed

reference/string/basic_string/resize_and_overwrite.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,12 @@
200200

201201
<p class="text-right"><small>
202202
最終更新日時(UTC):
203-
<span itemprop="datePublished" content="2025-08-31T10:06:36">
204-
2025年08月31日 10時06分36秒
203+
<span itemprop="datePublished" content="2025-11-01T12:42:33">
204+
2025年11月01日 12時42分33秒
205205
</span>
206206
<br/>
207207
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
208-
<span itemprop="name">Raclamusi</span>
208+
<span itemprop="name">onihusube</span>
209209
</span>
210210
が更新
211211
</small></p>
@@ -243,7 +243,7 @@ <h2><a class="cpprefjp-defined-word" data-desc="関数等の意味論を構成
243243
<li>呼び出された <code>op</code><a class="cpprefjp-defined-word" data-desc="問題が発生したときに、現在実行位置を過去に通過・記録した位置に戻し、文脈情報を添えて紐づけられた処理(例外ハンドラー)を呼び出す仕組み。またはその事態">例外</a>を投げないこと。</li>
244244
<li><code>op</code> の呼び出しで、第1引数・第2引数ともに変更されないこと。</li>
245245
<li><code>r = std::move(op)(data(), n)</code> とすると、<code>0 &lt;= r &amp;&amp; r &lt;= n</code> であること。</li>
246-
<li><code>[data(), data() + r)</code> の範囲に未初期化の要素がないこと。</li>
246+
<li><code>op</code>の呼び出し後、<code>[data(), data() + r)</code> の範囲に未初期化の要素がないこと。</li>
247247
</ul>
248248
<h2>効果</h2>
249249
<ol>

rss.xml

Lines changed: 29 additions & 197 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>2025-10-31T14:47:12.127370</updated>
6-
<id>5ca0fa56-e516-4744-8b98-011a77f116d3</id>
5+
<updated>2025-11-01T12:46:37.068733</updated>
6+
<id>8ee4c1e4-9417-49a6-815c-8416e90a866a</id>
77

88

9+
<entry>
10+
<title>resize_and_overwrite -- resize_and_overwrite : 事前条件に微妙に追記</title>
11+
<link href="https://cpprefjp.github.io/reference/string/basic_string/resize_and_overwrite.html"/>
12+
<id>0abb645c91ed60aac74cd982c1462ddecae90bd6:reference/string/basic_string/resize_and_overwrite.md</id>
13+
<updated>2025-11-01T21:42:33+09:00</updated>
14+
15+
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/string/basic_string/resize_and_overwrite.md b/reference/string/basic_string/resize_and_overwrite.md
16+
index 210ccc884..9c5e3110d 100644
17+
--- a/reference/string/basic_string/resize_and_overwrite.md
18+
+++ b/reference/string/basic_string/resize_and_overwrite.md
19+
@@ -29,7 +29,7 @@ constexpr void resize_and_overwrite(size_type n, Operation op); // C++23
20+
- 呼び出された `op` が例外を投げないこと。
21+
- `op` の呼び出しで、第1引数・第2引数ともに変更されないこと。
22+
- `r = std::move(op)(data(), n)` とすると、`0 &amp;lt;= r &amp;amp;&amp;amp; r &amp;lt;= n` であること。
23+
-- `[data(), data() + r)` の範囲に未初期化の要素がないこと。
24+
+- `op`の呼び出し後、`[data(), data() + r)` の範囲に未初期化の要素がないこと。
25+
26+
27+
## 効果
28+
&lt;/code&gt;&lt;/pre&gt;</summary>
29+
30+
<author>
31+
<name>onihusube</name>
32+
<email>[email protected]</email>
33+
</author>
34+
</entry>
35+
936
<entry>
1037
<title>スレッドローカルストレージ [N2659] -- 乱数のサンプルコード : より説明的なコードにするために乱数のシードを一旦変数にもつようにした</title>
1138
<link href="https://cpprefjp.github.io/lang/cpp11/thread_local_storage.html"/>
@@ -3944,199 +3971,4 @@ index db0530c44..ba24f7c55 100644
39443971
</author>
39453972
</entry>
39463973

3947-
<entry>
3948-
<title>rdbuf -- stringbuf, spanbuf : コード例や出力を修正</title>
3949-
<link href="https://cpprefjp.github.io/reference/spanstream/basic_spanstream/rdbuf.html"/>
3950-
<id>45eb8c111ab6158d1faa95d1689473b28b53ec2d:reference/spanstream/basic_spanstream/rdbuf.md</id>
3951-
<updated>2025-10-21T15:28:50+09:00</updated>
3952-
3953-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/spanstream/basic_spanstream/rdbuf.md b/reference/spanstream/basic_spanstream/rdbuf.md
3954-
index 1f3d610da..5458b49cb 100644
3955-
--- a/reference/spanstream/basic_spanstream/rdbuf.md
3956-
+++ b/reference/spanstream/basic_spanstream/rdbuf.md
3957-
@@ -49,7 +49,7 @@ int main()
3958-
### 出力
3959-
```
3960-
t
3961-
-est!
3962-
+!est
3963-
```
3964-
3965-
3966-
&lt;/code&gt;&lt;/pre&gt;</summary>
3967-
3968-
<author>
3969-
<name>Raclamusi</name>
3970-
<email>[email protected]</email>
3971-
</author>
3972-
</entry>
3973-
3974-
<entry>
3975-
<title>コンストラクタ -- stringbuf, spanbuf : コード例や出力を修正</title>
3976-
<link href="https://cpprefjp.github.io/reference/sstream/basic_stringbuf/op_constructor.html"/>
3977-
<id>45eb8c111ab6158d1faa95d1689473b28b53ec2d:reference/sstream/basic_stringbuf/op_constructor.md</id>
3978-
<updated>2025-10-21T15:28:50+09:00</updated>
3979-
3980-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/sstream/basic_stringbuf/op_constructor.md b/reference/sstream/basic_stringbuf/op_constructor.md
3981-
index 4936f70c8..db0530c44 100644
3982-
--- a/reference/sstream/basic_stringbuf/op_constructor.md
3983-
+++ b/reference/sstream/basic_stringbuf/op_constructor.md
3984-
@@ -129,13 +129,16 @@ int main()
3985-
std::cout &amp;lt;&amp;lt; buf1.str() &amp;lt;&amp;lt; std::endl;
3986-
3987-
// (3) 文字列を指定して構築
3988-
- std::stringbuf buf2(&amp;#34;initial&amp;#34;);
3989-
+ std::stringbuf buf2(&amp;#34;initial&amp;#34;, std::ios_base::out | std::ios_base::app);
3990-
buf2.sputc(&amp;#39;!&amp;#39;);
3991-
std::cout &amp;lt;&amp;lt; buf2.str() &amp;lt;&amp;lt; std::endl;
3992-
}
3993-
```
3994-
* sputc[link /reference/streambuf/basic_streambuf/sputc.md]
3995-
* str()[link str.md]
3996-
+* std::ios_base[link /reference/ios/ios_base.md]
3997-
+* out[link /reference/ios/ios_base/type-openmode.md]
3998-
+* app[link /reference/ios/ios_base/type-openmode.md]
3999-
4000-
#### 出力
4001-
```
4002-
&lt;/code&gt;&lt;/pre&gt;</summary>
4003-
4004-
<author>
4005-
<name>Raclamusi</name>
4006-
<email>[email protected]</email>
4007-
</author>
4008-
</entry>
4009-
4010-
<entry>
4011-
<title>str -- stringbuf, spanbuf : コード例や出力を修正</title>
4012-
<link href="https://cpprefjp.github.io/reference/sstream/basic_stringbuf/str.html"/>
4013-
<id>45eb8c111ab6158d1faa95d1689473b28b53ec2d:reference/sstream/basic_stringbuf/str.md</id>
4014-
<updated>2025-10-21T15:28:50+09:00</updated>
4015-
4016-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/sstream/basic_stringbuf/str.md b/reference/sstream/basic_stringbuf/str.md
4017-
index 7424b4953..b8dde7d0e 100644
4018-
--- a/reference/sstream/basic_stringbuf/str.md
4019-
+++ b/reference/sstream/basic_stringbuf/str.md
4020-
@@ -78,7 +78,7 @@ int main()
4021-
ch = buf.sbumpc(); // &amp;#39;e&amp;#39;
4022-
std::cout &amp;lt;&amp;lt; &amp;#34;3: After reading 2 chars: &amp;#34; &amp;lt;&amp;lt; buf.str() &amp;lt;&amp;lt; std::endl;
4023-
4024-
- // 書き込み(現在の位置から)
4025-
+ // 書き込み(読み取り位置と書き込み位置は別なので、先頭から書き込まれる)
4026-
buf.sputc(&amp;#39;X&amp;#39;);
4027-
buf.sputc(&amp;#39;Y&amp;#39;);
4028-
std::cout &amp;lt;&amp;lt; &amp;#34;4: After writing: &amp;#34; &amp;lt;&amp;lt; buf.str() &amp;lt;&amp;lt; std::endl;
4029-
@@ -97,7 +97,7 @@ int main()
4030-
1: Hello, World!
4031-
2: New content
4032-
3: After reading 2 chars: Read/Write test
4033-
-4: After writing: ReXY/Write test
4034-
+4: After writing: XYad/Write test
4035-
5: Empty? yes
4036-
```
4037-
4038-
&lt;/code&gt;&lt;/pre&gt;</summary>
4039-
4040-
<author>
4041-
<name>Raclamusi</name>
4042-
<email>[email protected]</email>
4043-
</author>
4044-
</entry>
4045-
4046-
<entry>
4047-
<title>コンストラクタ -- stringbuf, spanbuf : コード例や出力を修正</title>
4048-
<link href="https://cpprefjp.github.io/reference/sstream/basic_stringstream/op_constructor.html"/>
4049-
<id>45eb8c111ab6158d1faa95d1689473b28b53ec2d:reference/sstream/basic_stringstream/op_constructor.md</id>
4050-
<updated>2025-10-21T15:28:50+09:00</updated>
4051-
4052-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/sstream/basic_stringstream/op_constructor.md b/reference/sstream/basic_stringstream/op_constructor.md
4053-
index 43a302aa1..68db07c9a 100644
4054-
--- a/reference/sstream/basic_stringstream/op_constructor.md
4055-
+++ b/reference/sstream/basic_stringstream/op_constructor.md
4056-
@@ -121,12 +121,15 @@ int main()
4057-
std::cout &amp;lt;&amp;lt; s &amp;lt;&amp;lt; std::endl;
4058-
4059-
// (3) 文字列を指定して構築
4060-
- std::stringstream ss2(&amp;#34;initial value&amp;#34;);
4061-
+ std::stringstream ss2(&amp;#34;initial value&amp;#34;, std::ios_base::out | std::ios_base::app);
4062-
ss2 &amp;lt;&amp;lt; &amp;#34; added&amp;#34;;
4063-
std::cout &amp;lt;&amp;lt; ss2.str() &amp;lt;&amp;lt; std::endl;
4064-
}
4065-
```
4066-
* str()[link str.md]
4067-
+* std::ios_base[link /reference/ios/ios_base.md]
4068-
+* out[link /reference/ios/ios_base/type-openmode.md]
4069-
+* app[link /reference/ios/ios_base/type-openmode.md]
4070-
4071-
#### 出力
4072-
```
4073-
&lt;/code&gt;&lt;/pre&gt;</summary>
4074-
4075-
<author>
4076-
<name>Raclamusi</name>
4077-
<email>[email protected]</email>
4078-
</author>
4079-
</entry>
4080-
4081-
<entry>
4082-
<title>rdbuf -- stringbuf, spanbuf : コード例や出力を修正</title>
4083-
<link href="https://cpprefjp.github.io/reference/sstream/basic_stringstream/rdbuf.html"/>
4084-
<id>45eb8c111ab6158d1faa95d1689473b28b53ec2d:reference/sstream/basic_stringstream/rdbuf.md</id>
4085-
<updated>2025-10-21T15:28:50+09:00</updated>
4086-
4087-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/sstream/basic_stringstream/rdbuf.md b/reference/sstream/basic_stringstream/rdbuf.md
4088-
index c79760227..1683e7849 100644
4089-
--- a/reference/sstream/basic_stringstream/rdbuf.md
4090-
+++ b/reference/sstream/basic_stringstream/rdbuf.md
4091-
@@ -42,5 +42,5 @@ int main()
4092-
### 出力
4093-
```
4094-
t
4095-
-est!
4096-
+!est
4097-
```
4098-
&lt;/code&gt;&lt;/pre&gt;</summary>
4099-
4100-
<author>
4101-
<name>Raclamusi</name>
4102-
<email>[email protected]</email>
4103-
</author>
4104-
</entry>
4105-
4106-
<entry>
4107-
<title>str -- stringbuf, spanbuf : コード例や出力を修正</title>
4108-
<link href="https://cpprefjp.github.io/reference/sstream/basic_stringstream/str.html"/>
4109-
<id>45eb8c111ab6158d1faa95d1689473b28b53ec2d:reference/sstream/basic_stringstream/str.md</id>
4110-
<updated>2025-10-21T15:28:50+09:00</updated>
4111-
4112-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/sstream/basic_stringstream/str.md b/reference/sstream/basic_stringstream/str.md
4113-
index 9e62e17ef..7f77ddcb4 100644
4114-
--- a/reference/sstream/basic_stringstream/str.md
4115-
+++ b/reference/sstream/basic_stringstream/str.md
4116-
@@ -67,6 +67,7 @@ int main()
4117-
std::cout &amp;lt;&amp;lt; &amp;#34;1: &amp;#34; &amp;lt;&amp;lt; ss.str() &amp;lt;&amp;lt; std::endl;
4118-
4119-
// ストリームに追記
4120-
+ ss.seekp(0, std::ios_base::end);
4121-
ss &amp;lt;&amp;lt; &amp;#34; + added&amp;#34;;
4122-
std::cout &amp;lt;&amp;lt; &amp;#34;2: &amp;#34; &amp;lt;&amp;lt; ss.str() &amp;lt;&amp;lt; std::endl;
4123-
4124-
@@ -85,6 +86,9 @@ int main()
4125-
std::cout &amp;lt;&amp;lt; &amp;#34;5: Empty? &amp;#34; &amp;lt;&amp;lt; (ss.str().empty() ? &amp;#34;yes&amp;#34; : &amp;#34;no&amp;#34;) &amp;lt;&amp;lt; std::endl;
4126-
}
4127-
```
4128-
+* seekp[link /reference/ostream/basic_ostream/seekp.md]
4129-
+* std::ios_base[link /reference/ios/ios_base.md]
4130-
+* end[link /reference/ios/ios_base/type-seekdir.md]
4131-
4132-
#### 出力
4133-
```
4134-
&lt;/code&gt;&lt;/pre&gt;</summary>
4135-
4136-
<author>
4137-
<name>Raclamusi</name>
4138-
<email>[email protected]</email>
4139-
</author>
4140-
</entry>
4141-
41423974
</feed>

sitemap.xml

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

10401040
<url>
10411041
<loc>https://cpprefjp.github.io/reference/string/basic_string/resize_and_overwrite.html</loc>
1042-
<lastmod>2025-10-04T19:13:40+09:00</lastmod>
1042+
<lastmod>2025-11-01T21:42:33+09:00</lastmod>
10431043
<changefreq>daily</changefreq>
10441044
<priority>0.6</priority>
10451045
</url>

0 commit comments

Comments
 (0)