A header-only, non-intrusive, macro-free runtime reflection system for C++17 and later.
Meta is a header-only runtime reflection library for C++ that allows developers to inspect and manipulate types, members, and objects at runtime without macros or intrusive code changes. It solves the lack of built-in reflection in C++ by providing a lightweight, non-intrusive system for dynamic type operations, such as constructing objects, accessing data members, and invoking functions dynamically.
C++ developers working on projects that require runtime type introspection, such as game engines (e.g., EnTT integration), serialization systems, editor tools, or scripting interfaces where dynamic object handling is essential.
Developers choose Meta for its macro-free, non-intrusive design, header-only simplicity, and performance optimizations like small-buffer optimization (SBO). It offers more control and flexibility compared to other reflection libraries by avoiding allocations and supporting custom identifiers and policies.
Header-only, non-intrusive and macro-free runtime reflection system in C++
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Single-header inclusion with no external dependencies simplifies integration, as noted in the README's build instructions requiring only adding two headers and an include path.
Reflects existing types without modifying source code or requiring inheritance, enabling reflection on legacy codebases without intrusive changes.
Uses modern C++ templates and policies instead of preprocessor macros, leading to cleaner, more maintainable code as emphasized in the project's philosophy.
Supports dynamic construction, member access, function invocation, and type conversions with custom policies, allowing tailored behavior for different use cases.
Lightweight meta::any with small-buffer optimization (SBO) minimizes allocations, integrated seamlessly with the reflection system unlike std::any.
Mandates a compiler supporting C++17 or later, excluding older codebases and environments with strict version constraints, as stated in the requirements section.
Relies on advanced templates and policies, which can result in cryptic error messages and increased compile times, challenging for developers less familiar with modern C++.
Lacks out-of-the-box features like serialization or editor integrations; users must build additional layers on top, as admitted in the introduction's focus on minimalism.
While optimized, runtime reflection inherently adds overhead compared to static code, making it less suitable for performance-critical paths where every cycle counts.