Skip to content

Commit 51f2591

Browse files
author
cpprefjp-autoupdate
committed
update automatically
1 parent d08793f commit 51f2591

288 files changed

Lines changed: 105630 additions & 981 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

implementation-status.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@
164164

165165
<p class="text-right"><small>
166166
最終更新日時(UTC):
167-
<span itemprop="datePublished" content="2026-04-30T07:42:06">
168-
2026年04月30日 07時42分06秒
167+
<span itemprop="datePublished" content="2026-05-07T03:33:06">
168+
2026年05月07日 03時33分06秒
169169
</span>
170170
<br/>
171171
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
@@ -1238,7 +1238,7 @@ <h2><a href="#cpp20" id="cpp20">C++20言語機能の実装状況</a></h2>
12381238
</tr>
12391239
<tr>
12401240
<td>P0732R2: <a href="lang/cpp20/class_types_in_non-type_template_parameters.html">非型テンプレートパラメータとしてクラス型を許可する</a></td>
1241-
<td>定数式として使用できる型を広く非型テンプレートパラメータとして使用できるようにする</td>
1241+
<td>定数式として使用できる型を広く<a class="cpprefjp-defined-word" data-desc="定数テンプレートパラメータ。constant template parameter。テンプレートパラメータのうち、型ではなく値をとるもの。C++23以前は「非型テンプレートパラメータ (non-type template parameter)」と呼ばれていた">非型テンプレートパラメータ</a>として使用できるようにする</td>
12421242
<td>9</td>
12431243
<td>12</td>
12441244
<td>2022.2 Partial</td>
@@ -2074,9 +2074,9 @@ <h2><a href="#cpp26" id="cpp26">C++26言語機能の実装状況</a></h2>
20742074
<td></td>
20752075
</tr>
20762076
<tr>
2077-
<td>P2996R13: <span href="https://cpprefjp.github.io/lang/cpp26/reflection.md.nolink">静的リフレクション</span></td>
2077+
<td>P2996R13: <a href="lang/cpp26/reflection.html">静的リフレクション</a></td>
20782078
<td>リフレクション演算子<code>^^</code><code>std::meta::info</code>型によりコンパイル時にさまざまな情報を取得できる</td>
2079-
<td>16</td>
2079+
<td>16 (<code>-freflection</code> オプション指定)</td>
20802080
<td></td>
20812081
<td></td>
20822082
<td></td>

lang/cpp11/attributes.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,12 @@
188188

189189
<p class="text-right"><small>
190190
最終更新日時(UTC):
191-
<span itemprop="datePublished" content="2025-08-13T02:48:13">
192-
2025年08月13日 02時48分13秒
191+
<span itemprop="datePublished" content="2026-04-09T06:13:07">
192+
2026年04月09日 06時13分07秒
193193
</span>
194194
<br/>
195195
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
196-
<span itemprop="name">Y.Moroto</span>
196+
<span itemprop="name">Akira Takahashi</span>
197197
</span>
198198
が更新
199199
</small></p>
@@ -361,6 +361,10 @@ <h2><a href="#relative-page" id="relative-page">関連項目</a></h2>
361361
<li><a href="../cpp23/portable_assumptions.html">C++23 コード内容の仮定をコンパイラに伝える<code>assume</code>属性</a></li>
362362
<li><a href="../cpp26/attributes_for_structured_bindings.html">C++26 構造化束縛への属性を許可</a></li>
363363
<li><a href="../cpp26/erroneous_behavior_for_uninitialized_reads.html">C++26 未初期化変数の読み取りをエラー性動作とする (<code>[[indeterminate]]</code>属性)</a></li>
364+
<li><a href="../cpp26/reflection.html">C++26 静的リフレクション</a><ul>
365+
<li>属性と同じ<code>[[</code>...<code>]]</code>構文を用いたアノテーション機能<code>[[=expr]]</code>が導入される。属性はコンパイラへのヒントだが、アノテーションはリフレクションで取得可能な<a class="cpprefjp-defined-word" data-desc="プログラム定義。ユーザー(プログラマ)によって定義されること(標準ライブラリで定義されるものを除く)">ユーザー定義</a>のメタデータである</li>
366+
</ul>
367+
</li>
364368
</ul>
365369
<h2>参照</h2>
366370
<ul>

lang/cpp11/constexpr.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ <h3>コンパイル時再帰回数</h3>
368368
<h2>この機能が必要になった背景・経緯</h2>
369369
<p><code>constexpr</code>の主な目的は、数値型のプロパティを取得するクラス<code><a href="../../reference/limits/numeric_limits.html">std::numeric_limits</a></code>の、プロパティ取得の関数を定数式にすることである。</p>
370370
<p>たとえば、<code><a href="../../reference/limits/numeric_limits.html">std::numeric_limits</a></code><code><a href="../../reference/limits/numeric_limits/max.html">max()</a></code>静的メンバ関数は、<code>int</code>型に対しては<code><a href="../../reference/climits/int_max.html">INT_MAX</a></code>マクロの値を返すだけであるが、それが関数であるために、<code><a href="../../reference/climits/int_max.html">INT_MAX</a></code>マクロと違って定数として扱えない、という問題があった。抽象化された機能を使うより、抽象化されていない機能の方がよい、というのは、改善すべき事態だった。そのため、関数を静的に評価する仕組みが必要とされた。</p>
371-
<p>また、<code>constexpr</code>は、値を計算するテンプレートメタプログラムを置き換えて使用できる。テンプレートメタプログラミングでは、非型テンプレートパラメータによって整数型の値をコンパイル時に計算することはできた。しかし、浮動小数点数型の値や、その他多くの値に関する計算が難しく、構文もまた通常の関数とはかけ離れていた(浮動小数点数型の値の計算は、分数形式にすれば、できることはできる)。値をコンパイル時に計算するためには、今後はテンプレートメタプログラミングよりも<code>constexpr</code>を積極的に使用していくとよいだろう。</p>
371+
<p>また、<code>constexpr</code>は、値を計算するテンプレートメタプログラムを置き換えて使用できる。テンプレートメタプログラミングでは、<a class="cpprefjp-defined-word" data-desc="定数テンプレートパラメータ。constant template parameter。テンプレートパラメータのうち、型ではなく値をとるもの。C++23以前は「非型テンプレートパラメータ (non-type template parameter)」と呼ばれていた">非型テンプレートパラメータ</a>によって整数型の値をコンパイル時に計算することはできた。しかし、浮動小数点数型の値や、その他多くの値に関する計算が難しく、構文もまた通常の関数とはかけ離れていた(浮動小数点数型の値の計算は、分数形式にすれば、できることはできる)。値をコンパイル時に計算するためには、今後はテンプレートメタプログラミングよりも<code>constexpr</code>を積極的に使用していくとよいだろう。</p>
372372
<h2><a href="#relative-page" id="relative-page">関連項目</a></h2>
373373
<ul>
374374
<li><a href="user_defined_literals.html">C++11 ユーザー定義リテラル</a></li>

lang/cpp11/right_angle_brackets.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ <h2>この機能が必要になった背景・経緯</h2>
282282
<p>これは小さな問題ではあるが、永続的で迷惑な問題であったために、この問題を除去する価値があると判断され、GNUやEDGといったコンパイラベンダーによるいくつかの実験を経て、標準C++に、連続する右山カッコに関するルールが追加されることとなった。</p>
283283
<h2>検討されたほかの選択肢</h2>
284284
<p>C++11で採択された方式は、テンプレートの型パラメータと非型パラメータどちらにも対応するものだったが、それ以外の方式も提案された。</p>
285-
<p>ひとつは、テンプレートの型パラメータのみを構文解析で特別扱いし、非型テンプレートパラメータをそのままとするもの。これによって、<code>A&lt;B&lt;int&gt;&gt;</code><a class="cpprefjp-defined-word" data-desc="プログラムが文法規則・診断対象の意味規則・単一定義規則を満たすこと" href="../../implementation-compliance.html#dfn-well-formed">適格</a>だが、<code>C&lt;D&lt;12&gt;&gt;</code><a class="cpprefjp-defined-word" data-desc="プログラムが適格でないこと。コンパイルエラーなどになる" href="../../implementation-compliance.html#dfn-ill-formed">不適格</a>となる。</p>
285+
<p>ひとつは、テンプレートの型パラメータのみを構文解析で特別扱いし、<a class="cpprefjp-defined-word" data-desc="定数テンプレートパラメータ。constant template parameter。テンプレートパラメータのうち、型ではなく値をとるもの。C++23以前は「非型テンプレートパラメータ (non-type template parameter)」と呼ばれていた">非型テンプレートパラメータ</a>をそのままとするもの。これによって、<code>A&lt;B&lt;int&gt;&gt;</code><a class="cpprefjp-defined-word" data-desc="プログラムが文法規則・診断対象の意味規則・単一定義規則を満たすこと" href="../../implementation-compliance.html#dfn-well-formed">適格</a>だが、<code>C&lt;D&lt;12&gt;&gt;</code><a class="cpprefjp-defined-word" data-desc="プログラムが適格でないこと。コンパイルエラーなどになる" href="../../implementation-compliance.html#dfn-ill-formed">不適格</a>となる。</p>
286286
<p>もうひとつは、2つの連続した<code>&gt;</code>トークンの問題を完全に除去するために、シフト演算子の構文もまた<code>&gt; &gt;</code>のように間にスペースを入れるよう許可すること。<code>int i = 10000 &gt; &gt; x;</code>。このアプローチは新たな曖昧さは導入しないが、プリプロセッサの<code>##</code>(トークン連結)において後方互換性の問題を発生させる。</p>
287287
<p>こういった、現在の方式と合わせて3つが検討された。現在の方式によって意味が変わるプログラムは使われている可能性が低かったこともあり、現在の方式が採用された。</p>
288288
<h2>参照</h2>

lang/cpp11/sfinae_expressions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ <h2>仕様</h2>
334334
</code></pre></div>
335335
</p>
336336
<ul>
337-
<li>非型テンプレートパラメータに無効の型を渡すことを試みること</li>
337+
<li><a class="cpprefjp-defined-word" data-desc="定数テンプレートパラメータ。constant template parameter。テンプレートパラメータのうち、型ではなく値をとるもの。C++23以前は「非型テンプレートパラメータ (non-type template parameter)」と呼ばれていた">非型テンプレートパラメータ</a>に無効の型を渡すことを試みること</li>
338338
</ul>
339339
<p><div class="codehilite"><pre><span></span><code><span class="k">template</span><span class="w"> </span><span class="o">&lt;</span><span class="k">class</span><span class="w"> </span><span class="nc">T</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">S</span><span class="w"> </span><span class="p">{};</span>
340340
<span class="k">template</span><span class="w"> </span><span class="o">&lt;</span><span class="k">class</span><span class="w"> </span><span class="nc">T</span><span class="o">&gt;</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">f</span><span class="p">(</span><span class="n">S</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="p">()</span><span class="o">&gt;*</span><span class="p">);</span>

lang/cpp14/nontype_template_parameters_of_type_nullptr_t.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ <h1 itemprop="name"><span class="token">nullptr_t型の定数式を非型テン
218218
<p>のちのC++規格でさらに変更される場合があるため<a href="#relative-page">関連項目</a>を参照してください。</p>
219219
<p></p>
220220
<h2>概要</h2>
221-
<p><code><a href="../../reference/cstddef/nullptr_t.html">nullptr_t</a></code>型の定数式を非型テンプレートパラメータとすることが許可された</p>
221+
<p><code><a href="../../reference/cstddef/nullptr_t.html">nullptr_t</a></code>型の定数式を<a class="cpprefjp-defined-word" data-desc="定数テンプレートパラメータ。constant template parameter。テンプレートパラメータのうち、型ではなく値をとるもの。C++23以前は「非型テンプレートパラメータ (non-type template parameter)」と呼ばれていた">非型テンプレートパラメータ</a>とすることが許可された</p>
222222
<h2></h2>
223223
<p><div class="yata" id="cb65215a41d26fce978ecc3da90651d845e34a91"><div class="codehilite"><pre><span></span><code><span class="cp">#include <a href="../../reference/cstddef.html">&lt;cstddef&gt;</a></span>
224224

lang/cpp17/allow_constant_evaluation_for_all_non-type_template_arguments.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ <h2>仕様</h2>
231231
<p>直接の根拠は、次の記述が与えている。C++14での記述は削除され、C++17で置き換えられた。</p>
232232
<p><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4659.pdf" target="_blank">n4659</a> [temp.arg.nontype]/2より</p>
233233
<p>型ではないテンプレートパラメータのテンプレート引数は、テンプレートパラメータの型の変換された定数式になる。
234-
参照型またはポインタ型の非型テンプレートパラメータの場合、定数式の値は参照してはいけない(ポインタ型の場合は、次のアドレスにはならない)</p>
234+
参照型またはポインタ型の<a class="cpprefjp-defined-word" data-desc="定数テンプレートパラメータ。constant template parameter。テンプレートパラメータのうち、型ではなく値をとるもの。C++23以前は「非型テンプレートパラメータ (non-type template parameter)」と呼ばれていた">非型テンプレートパラメータ</a>の場合、定数式の値は参照してはいけない(ポインタ型の場合は、次のアドレスにはならない)</p>
235235
<ul>
236236
<li>サブオブジェクト</li>
237237
<li>一時オブジェクト</li>

lang/cpp17/declaring_non-type_template_arguments_with_auto.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ <h1 itemprop="name"><span class="token">非型テンプレートパラメータ
218218
<p>のちのC++規格でさらに変更される場合があるため<a href="#relative-page">関連項目</a>を参照してください。</p>
219219
<p></p>
220220
<h2>概要</h2>
221-
<p>C++14まで、以下のように書いていた「指定された型の定数を受け取る」意図の非型テンプレートパラメータ(non-type template parameter)だが、</p>
221+
<p>C++14まで、以下のように書いていた「指定された型の定数を受け取る」意図の<a class="cpprefjp-defined-word" data-desc="定数テンプレートパラメータ。constant template parameter。テンプレートパラメータのうち、型ではなく値をとるもの。C++23以前は「非型テンプレートパラメータ (non-type template parameter)」と呼ばれていた">非型テンプレートパラメータ</a>(non-type template parameter)だが、</p>
222222
<p><div class="codehilite"><pre><span></span><code><span class="k">template</span><span class="w"> </span><span class="o">&lt;</span><span class="k">class</span><span class="w"> </span><span class="nc">T</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="w"> </span><span class="n">V</span><span class="o">&gt;</span>
223223
<span class="k">struct</span><span class="w"> </span><span class="nc">X</span><span class="p">;</span>
224224

lang/cpp20.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ <h3>テンプレート</h3>
417417
</tr>
418418
<tr>
419419
<td><a href="cpp20/class_types_in_non-type_template_parameters.html">非型テンプレートパラメータとしてクラス型を許可する</a></td>
420-
<td>定数式として使用できる型を広く非型テンプレートパラメータとして使用できるようにする</td>
420+
<td>定数式として使用できる型を広く<a class="cpprefjp-defined-word" data-desc="定数テンプレートパラメータ。constant template parameter。テンプレートパラメータのうち、型ではなく値をとるもの。C++23以前は「非型テンプレートパラメータ (non-type template parameter)」と呼ばれていた">非型テンプレートパラメータ</a>として使用できるようにする</td>
421421
</tr>
422422
<tr>
423423
<td><a href="cpp20/adl_and_function_templates_that_are_not_visible.html">関数テンプレートに明示的に型指定した場合にADLで見つからない問題を修正</a></td>

0 commit comments

Comments
 (0)