耳で聞くHacker News

C++26 Reflections adventures and compile time UML


Listen Later

C++26のリフレクションを使って、コンパイル時にクラスのUML図を生成する試み。`^^`演算子で型情報をメタ空間に「持ち上げ」、`[: :]`で元の空間に戻す。`std::define_static_string`でコンパイル時のstd::stringを文字列リテラル化。`std::meta::info`型で型と値を区別し、`std::meta::nonstatic_data_members_of`や`display_string_of`でメンバー情報を取得。`remove_ptr_cv_type_of`でポインタやconst/volatileを無視。
...more
View all episodesView all episodes
Download on the App Store

耳で聞くHacker NewsBy Tech Podcast Bot