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" >< pre>< code> 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 & lt;= r & amp;& amp; r & lt;= n` であること。
23+ -- `[data(), data() + r)` の範囲に未初期化の要素がないこと。
24+ +- `op`の呼び出し後、`[data(), data() + r)` の範囲に未初期化の要素がないこと。
25+
26+
27+ ## 効果
28+ < /code>< /pre> </summary >
29+
30+ <author >
31+ <name >onihusube</name >
32+ 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" >< pre>< code> 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- < /code>< /pre> </summary >
3967-
3968- <author >
3969- <name >Raclamusi</name >
3970- 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" >< pre>< code> 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 & lt;& lt; buf1.str() & lt;& lt; std::endl;
3986-
3987- // (3) 文字列を指定して構築
3988- - std::stringbuf buf2(& #34;initial& #34;);
3989- + std::stringbuf buf2(& #34;initial& #34;, std::ios_base::out | std::ios_base::app);
3990- buf2.sputc(& #39;!& #39;);
3991- std::cout & lt;& lt; buf2.str() & lt;& 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- < /code>< /pre> </summary >
4003-
4004- <author >
4005- <name >Raclamusi</name >
4006- 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" >< pre>< code> 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(); // & #39;e& #39;
4022- std::cout & lt;& lt; & #34;3: After reading 2 chars: & #34; & lt;& lt; buf.str() & lt;& lt; std::endl;
4023-
4024- - // 書き込み(現在の位置から)
4025- + // 書き込み(読み取り位置と書き込み位置は別なので、先頭から書き込まれる)
4026- buf.sputc(& #39;X& #39;);
4027- buf.sputc(& #39;Y& #39;);
4028- std::cout & lt;& lt; & #34;4: After writing: & #34; & lt;& lt; buf.str() & lt;& 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- < /code>< /pre> </summary >
4039-
4040- <author >
4041- <name >Raclamusi</name >
4042- 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" >< pre>< code> 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 & lt;& lt; s & lt;& lt; std::endl;
4058-
4059- // (3) 文字列を指定して構築
4060- - std::stringstream ss2(& #34;initial value& #34;);
4061- + std::stringstream ss2(& #34;initial value& #34;, std::ios_base::out | std::ios_base::app);
4062- ss2 & lt;& lt; & #34; added& #34;;
4063- std::cout & lt;& lt; ss2.str() & lt;& 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- < /code>< /pre> </summary >
4074-
4075- <author >
4076- <name >Raclamusi</name >
4077- 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" >< pre>< code> 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- < /code>< /pre> </summary >
4099-
4100- <author >
4101- <name >Raclamusi</name >
4102- 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" >< pre>< code> 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 & lt;& lt; & #34;1: & #34; & lt;& lt; ss.str() & lt;& lt; std::endl;
4118-
4119- // ストリームに追記
4120- + ss.seekp(0, std::ios_base::end);
4121- ss & lt;& lt; & #34; + added& #34;;
4122- std::cout & lt;& lt; & #34;2: & #34; & lt;& lt; ss.str() & lt;& lt; std::endl;
4123-
4124- @@ -85,6 +86,9 @@ int main()
4125- std::cout & lt;& lt; & #34;5: Empty? & #34; & lt;& lt; (ss.str().empty() ? & #34;yes& #34; : & #34;no& #34;) & lt;& 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- < /code>< /pre> </summary >
4135-
4136- <author >
4137- <name >Raclamusi</name >
4138- 4139- </author >
4140- </entry >
4141-
41423974</feed >
0 commit comments