Skip to content

Commit 249b844

Browse files
Preview PR 1541: 71ddec21e0f1cc
1 parent cdc95f3 commit 249b844

5 files changed

Lines changed: 78 additions & 1477 deletions

File tree

gen/pull/1541/PREVIEW.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# PR [\#1541](https://github.com/cpprefjp/site/pull/1541) プレビュー
2-
- ⌚ 更新時刻: 2026-01-06 14:57:22 JST
2+
- ⌚ 更新時刻: 2026-01-06 15:51:05 JST
33
- 🔍 [プレビュー (HTML)](https://cpprefjp.github.io/site/gen/pull/1541)
44
- 📈 [プレビュー生成記録](https://github.com/cpprefjp/site/actions?query=event%3Apull_request_target+branch%3Amblen)
5-
- **⫯** ソースの変更: [`1e0f1cc..3cde062`](https://github.com/cpprefjp/site/compare/1e0f1cc6b3b7a9774e7be497fd844f69e64c07c2..3cde06286c6212ec37f10c5fdac2c33ef7ca4f17)
5+
- **⫯** ソースの変更: [`1e0f1cc..71ddec2`](https://github.com/cpprefjp/site/compare/1e0f1cc6b3b7a9774e7be497fd844f69e64c07c2..71ddec23c676ec85e80932553499c026d838bfec)
66

77
## 変更記事一覧 (1件)
88

gen/pull/1541/reference/chrono/make24.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ <h2>例</h2>
239239
<span class="n"><a href="../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n"><span style="color:#ff0000">chrono::make24</span></span><span class="p">(</span><span class="n"><a href="duration/op_h.html">12h</a></span><span class="p">,</span> <span class="nb">false</span><span class="p">)</span> <span class="o">==</span> <span class="n"><a href="duration/op_h.html">0h</a></span><span class="p">);</span>
240240

241241
<span class="n"><a href="../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n"><span style="color:#ff0000">chrono::make24</span></span><span class="p">(</span><span class="n"><a href="duration/op_h.html">12h</a></span><span class="p">,</span> <span class="nb">true</span><span class="p">)</span> <span class="o">==</span> <span class="n"><a href="duration/op_h.html">12h</a></span><span class="p">);</span>
242-
<span class="n"><a href="../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n"><span style="color:#ff0000">chrono::make24</span></span><span class="p">(</span><span class="n"><a href="duration/op_h.html">1h</a></span><span class="p">,</span> <span class="nb">true</span><span class="p">)</span> <span class="o">==</span> <span class="mf">1f</span><span class="n">zsBPrhkfWewpECJreuWHjAnRsMRpkel</span><span class="p">);</span>
242+
<span class="n"><a href="../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n"><span style="color:#ff0000">chrono::make24</span></span><span class="p">(</span><span class="n"><a href="duration/op_h.html">1h</a></span><span class="p">,</span> <span class="nb">true</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="n"><a href="duration/op_h.html">3h</a></span><span class="p">);</span>
243243
<span class="n"><a href="../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n"><span style="color:#ff0000">chrono::make24</span></span><span class="p">(</span><span class="n"><a href="duration/op_h.html">3h</a></span><span class="p">,</span> <span class="nb">true</span><span class="p">)</span> <span class="o">==</span> <span class="n"><a href="duration/op_h.html">15h</a></span><span class="p">);</span>
244244
<span class="n"><a href="../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n"><span style="color:#ff0000">chrono::make24</span></span><span class="p">(</span><span class="n"><a href="duration/op_h.html">11h</a></span><span class="p">,</span> <span class="nb">true</span><span class="p">)</span> <span class="o">==</span> <span class="n"><a href="duration/op_h.html">23h</a></span><span class="p">);</span>
245245
<span class="p">}</span>

gen/pull/1541/reference/cstdlib/mblen.html

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@
188188

189189
<p class="text-right"><small>
190190
最終更新日時(UTC):
191-
<span itemprop="datePublished" content="2026-01-06T05:35:23">
192-
2026年01月06日 05時35分23秒
191+
<span itemprop="datePublished" content="2026-01-06T06:37:48">
192+
2026年01月06日 06時37分48秒
193193
</span>
194194
<br/>
195195
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
@@ -223,10 +223,10 @@ <h2>概要</h2>
223223
<p>先頭以外の文字に関するバイト数は計算されない。</p>
224224
<p>この関数は現在のロケールカテゴリー <code>LC_CTYPE</code> に依存してマルチバイト文字を解釈する。</p>
225225
<p><code>n</code>は解析に使用する最大バイト数を指定する。</p>
226-
<p>エンコーディングの内部状態に関する振る舞いが最近の規格で変更されたことから、
227-
内部状態に依存するエンコーディングを考慮するならば、
226+
<p>内部状態に依存するエンコーディングを考慮するならば、
228227
特に理由がない限り <code>std::mblen</code> ではなく <code>std::mbstate_t</code> を受け取る <code>std::mbrlen</code>
229228
新しいコードでは用いるべきである。
229+
エンコーディングの内部状態に関する振る舞いが C11 で変更 (WG14 N1373) されたが、
230230
以前の振る舞いではスレッドセーフではなく、
231231
現在の振る舞いではそもそも内部状態に依存する使い方ができない。</p>
232232
<h3>C11, C++17, POSIX.1-2024 以降</h3>
@@ -322,6 +322,21 @@ <h4>出力例</h4>
322322
<h2>関連項目</h2>
323323
<ul>
324324
<li><code><span href="https://cpprefjp.github.io/reference/cwchar/mbrlen.md.nolink">mbrlen</span></code>: <code>std::mbstate_t</code> を受け取るスレッドセーフなバージョン</li>
325+
<li><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1373.htm" target="_blank">WG14 N1373: Wording improvements for mblen, mbtowc, and c16rtomb</a><ul>
326+
<li>単なる「表現の改善」としてこの破壊的な変更が実施されたように見える。</li>
327+
<li><a href="https://www.openwall.com/lists/musl/2019/12/26/7" target="_blank">musl のメーリングリスト - 2019-12-26</a> にて Florian Weimer が以下のように指摘している:
328+
"actual users of the interfaces with legacy charsets do not seem to be represented on the standards committee anymore (see the mblen behavioral change in C11 as evidence supporting this theory)."
329+
訳: C11 における mblen の振る舞い変更でも分かるように、C標準化委員会には古い文字コードを使っている人がいないようだ。</li>
330+
</ul>
331+
</li>
332+
<li><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2037.htm" target="_blank">WG14 N2037: mblen, mbtowc, and wctomb thread-safety</a><ul>
333+
<li><a href="https://www.open-std.org/jtc1/sc22/wg14/issues/c11c17/issue0498.html" target="_blank">WG14 DR498: mblen, mbtowc, and wctomb thread-safety</a></li>
334+
<li><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2246.htm" target="_blank">WG14 N2246: Make mblen, mbtowc, and wctomb thread-safe for encodings that are not state-dependent</a></li>
335+
<li><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2281.htm" target="_blank">WG14 N2281: Make mblen, mbtowc, and wctomb thread-safe for encodings that are not state-dependent</a></li>
336+
<li><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2358.htm" target="_blank">WG14 N2358: No internal state for mblen</a></li>
337+
<li>C11 以降もあたかも <code>mblen</code> が内部状態を持つかのような記述になっていたのが C23 で修正された。</li>
338+
</ul>
339+
</li>
325340
</ul></div>
326341

327342
</div>

0 commit comments

Comments
 (0)