|
2 | 2 | <feed xmlns="http://www.w3.org/2005/Atom"> |
3 | 3 | <title>cpprefjp - C++日本語リファレンス</title> |
4 | 4 | <link href="https://cpprefjp.github.io" /> |
5 | | - <updated>2026-04-24T03:09:12.212799</updated> |
6 | | - <id>3f81000d-ead0-410b-b83a-4ad37eff518c</id> |
| 5 | + <updated>2026-04-24T03:23:29.043945</updated> |
| 6 | + <id>d94d3d66-e062-435e-837e-d2cd744c027d</id> |
7 | 7 |
|
8 | 8 |
|
| 9 | + <entry> |
| 10 | + <title>静的リフレクション [P2996R13] -- reflection : スプライスに使用する変数をconstexprに修正</title> |
| 11 | + <link href="https://cpprefjp.github.io/lang/cpp26/reflection.html"/> |
| 12 | + <id>8b40265a2b69c4733cb4796486fb7a165cf42378:lang/cpp26/reflection.md</id> |
| 13 | + <updated>2026-04-24T12:16:35+09:00</updated> |
| 14 | + |
| 15 | + <summary type="html"><pre><code>diff --git a/lang/cpp26/reflection.md b/lang/cpp26/reflection.md |
| 16 | +index 11749b705..3b1e9cac5 100644 |
| 17 | +--- a/lang/cpp26/reflection.md |
| 18 | ++++ b/lang/cpp26/reflection.md |
| 19 | +@@ -142,7 +142,7 @@ struct S { int x; int y; }; |
| 20 | + consteval void example() { |
| 21 | + S s{1, 2}; |
| 22 | + |
| 23 | +- auto members = std::meta::nonstatic_data_members_of( |
| 24 | ++ constexpr auto members = std::meta::nonstatic_data_members_of( |
| 25 | + ^^S, std::meta::access_context::unchecked()); |
| 26 | + |
| 27 | + int a = s.[:members[0]:]; // s.x と等価。a == 1 |
| 28 | +@@ -162,7 +162,7 @@ struct Derived : Base { int d; }; |
| 29 | + |
| 30 | + consteval void example() { |
| 31 | + Derived obj{{42}, 100}; |
| 32 | +- auto bases = std::meta::bases_of( |
| 33 | ++ constexpr auto bases = std::meta::bases_of( |
| 34 | + ^^Derived, std::meta::access_context::unchecked()); |
| 35 | + Base&amp; base_ref = obj.[:bases[0]:]; // 基底クラスのサブオブジェクトへの参照 |
| 36 | + } |
| 37 | +@@ -250,7 +250,7 @@ struct [[=Name{std::define_static_string(&#34;点&#34;)}]] Point { |
| 38 | + template for (constexpr auto m : |
| 39 | + std::define_static_array(std::meta::nonstatic_data_members_of(^^Point, |
| 40 | + std::meta::access_context::unchecked()))) { |
| 41 | +- auto annots = std::meta::annotations_of_with_type(m, ^^Name); |
| 42 | ++ constexpr auto annots = std::meta::annotations_of_with_type(m, ^^Name); |
| 43 | + if constexpr (annots.size() &gt; 0) { |
| 44 | + std::println(&#34;{}: {}&#34;, [:annots[0]:].value, |
| 45 | + std::meta::identifier_of(m)); |
| 46 | +</code></pre></summary> |
| 47 | + |
| 48 | + <author> |
| 49 | + <name>Akira Takahashi</name> |
| 50 | + <email>faithandbrave@gmail.com</email> |
| 51 | + </author> |
| 52 | + </entry> |
| 53 | + |
9 | 54 | <entry> |
10 | 55 | <title>静的リフレクション [P2996R13] -- reflection : 「リフレクションできる対象と、取得できる主な情報」の表にannotations_ofを追加</title> |
11 | 56 | <link href="https://cpprefjp.github.io/lang/cpp26/reflection.html"/> |
@@ -460,32 +505,6 @@ index f19bada67..b866ac666 100644 |
460 | 505 | ``` |
461 | 506 |
|
462 | 507 |
|
463 | | -</code></pre></summary> |
464 | | - |
465 | | - <author> |
466 | | - <name>Akira Takahashi</name> |
467 | | - <email>faithandbrave@gmail.com</email> |
468 | | - </author> |
469 | | - </entry> |
470 | | - |
471 | | - <entry> |
472 | | - <title>members_of -- members_of : 出力ミスを修正</title> |
473 | | - <link href="https://cpprefjp.github.io/reference/meta/members_of.html"/> |
474 | | - <id>ed56543f857a3acb869029daee7e47740190b73a:reference/meta/members_of.md</id> |
475 | | - <updated>2026-04-24T11:48:20+09:00</updated> |
476 | | - |
477 | | - <summary type="html"><pre><code>diff --git a/reference/meta/members_of.md b/reference/meta/members_of.md |
478 | | -index 97f871f5d..aeb6663cb 100644 |
479 | | ---- a/reference/meta/members_of.md |
480 | | -+++ b/reference/meta/members_of.md |
481 | | -@@ -46,6 +46,7 @@ int main() { |
482 | | - |
483 | | - #### 出力例 |
484 | | - ``` |
485 | | -+メンバ数: 9 |
486 | | - ``` |
487 | | - |
488 | | - |
489 | 508 | </code></pre></summary> |
490 | 509 |
|
491 | 510 | <author> |
|
0 commit comments