Explore a reflection-generated type descriptor in place of `std::type_info`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by reading the vtable implementation around its std::type_info* entry and the target_type and protocol_cast APIs; the issue does not name files or tests. Compare the constraints in #440 and the proposed reflection use cases, then determine whether a descriptor can address them without RTTI. The issue suggests no change for R3 and leaves descriptor design open, so there is no defined implementation or test for completion.
索引モデルが issue の本文から書いたものです。
説明
The first entry of every vtable is a const std::type_info*, read by target_type and protocol_cast. It needs RTTI and offers a name, a hash and equality.
Go puts a pointer to its type descriptor in the same place, and builds run-time reflection on it: an any is a descriptor pointer and a data pointer, the same shape as protocol<Any>. Related work:
- Valentyn Yukhymenko, Inside Reflection (FOSDEM 2026), on how
reflectreads the descriptor out of an interface value. - CallMeMaybe builds a run-time registry from P2996 reflection and "implements a custom type system to completely avoid RTTI requirements".
- proxy's
add_reflectionlets a facade attach a user-defined object, built at compile time from the contained type, and read it back withproxy_reflect.
Questions:
- Can
target_typeandprotocol_castwork without RTTI, using the address of a per-type descriptor as the identity? The shared-library uniqueness concern in #440 applies, andtarget_typecould no longer returnstd::type_infoasany::typedoes. - Should the descriptor be extensible by the user, as proxy's is? Where would a plain interface struct say so?
- Is there a use case that
type_infodoes not serve: logging, serialisation, constrained targets (#287)?
Suggested: no change for R3. Keep the vtable's contents unspecified so that a descriptor can be added later.
- 主要言語
- C++
- スター
- 12
- フォーク
- 4
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 21
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
jbcoe/cc-protocol のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 71/100
jbcoe/cc-protocol#520 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
jbcoe/cc-protocol#507 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
jbcoe/cc-protocol#455 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
jbcoe/cc-protocol#407 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
jbcoe/cc-protocol#194 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
jbcoe/cc-protocol の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
category:port-update
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
bug-unconfirmed
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
good first issue help wanted phase:0 priority:P3 type:task
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信