Reflecting Types in C++17/20
summary
Shows a working technique to reflect C++ types under C++17 by using a front-injection hack that emits meta-info objects as friend functions, then retrieves original types via splice; C++20 structural non-type template parameters and ranges let the code treat a typelist as a range and run std::views::drop/transform and views::reverse to produce new typelists. Example filters by sizeof < 4 to yield two types (n16 and n8). Compiles on recent compilers; GCC lacks non-template friend support and Godbolt emits a warning.
AI-written summary · about
related talks
55mC++14 Reflections Without Macros, Markup nor External Tooling..
01h 01mReflection
01h 01mThe promise of static reflection in C++26: Type Traits without compiler intrinsics
47mReflection Techniques in C++
01h 04mWelcome to v1.0 of the meta::[[verse]]!
56mExploring Dependency Injection and Reflection in Modern C++
01h 08mReflections: Compile-time Introspection of Source Code
57mIntroduction to C++ Template Metaprogramming
