A C++ library that provides runtime type reflection, enabling introspection and modification of objects at runtime.
RTTR is a C++ reflection library that enables runtime type introspection and manipulation, allowing developers to inspect and modify class structures, properties, and methods dynamically. It solves the problem of C++'s lack of built-in reflection, facilitating tasks like serialization, scripting, and plugin systems without relying on RTTI or external tools.
C++ developers working on projects that require dynamic type handling, such as game engines, serialization frameworks, plugin architectures, or tools that need to inspect and manipulate objects at runtime.
Developers choose RTTR because it provides a full-featured, dependency-free reflection solution for C++ that is portable, fast, and avoids the overhead of exceptions and RTTI, making it ideal for performance-critical applications and cross-platform development.
C++ Reflection Library
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Requires only standard C++11 with no external libraries, RTTI, or exceptions, ensuring wide compiler support and ease of integration across platforms like game consoles.
Manual registration keeps reflection data in .cpp files, preventing header pollution and reducing recompilation times when types are modified.
Reflects constructors, methods, data members, enums, and supports single, multiple, and virtual inheritance, enabling dynamic operations on complex class hierarchies.
Allows working with custom types without compile-time declarations, facilitating flexible plugin systems and runtime extensions.
Every type must be explicitly registered using macros, which is tedious and error-prone for large codebases, increasing maintenance overhead.
While designed to be lightweight, dynamic reflection introduces performance costs for operations like property access or method invocation, which may impact tight loops.
Lacks built-in utilities for common tasks like serialization or UI binding; developers must implement these themselves, adding to project complexity.