What about a macro to define enums?
メンテナーはふだん 1 日以内に返信
@PhilipFackler がすでに取り組んでいます。
2026年6月12日 から。
評価
この issue はまだ評価されていません。
説明
Comments on #440 got me thinking about this (again), especially because we don't want magic_enum to creep into the core code. So I gave it a shot.
Attached is an implementation of a preprocessor macro (most of which I copied from a blog) and some examples. This implements parse, print, and size functions. There's more we could do if everyone is in-favor of the basic approach, but also I would completely understand any resistance. I dislike macros generally, but in this case it seems a good workaround to the limitations on enums in C++.
Also, try it out here.
https://godbolt.org/z/KvvTT3hv1
- 主要言語
- C++
- スター
- 27
- フォーク
- 11
- 平均マージ
- 2日 21時間
- マージ済み PR(30日)
- 15
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ORNL/GridKit のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
ORNL/GridKit#587 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Companion OPF models for PD initialization constraints対応中かも @lukelowry が 4 日前に担当しました。 オープンIVP question
メンテナーはふだん 1 日以内に返信
-
Extract CommonMath functions再び着手できるかも @amandeep25100-a11y が 7 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンcleanup
難易度 4/5 3〜5日 初心者へのやさしさ 54/100
メンテナーはふだん 1 日以内に返信
-
enhancement question
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
ORNL/GridKit#624 · コメント 2 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Add support for hierarchical modeling to the JSON format case file specifications対応中かも @abirchfield が 34 日前に担当しました。 オープンdocumentation enhancement new case question
ORNL/GridKit#619 · コメント 8 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
schrodinger/pymol-open-source#532 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
xlnt-community/xlnt#174 ·
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
sleepyviper1213/redis#30 ·