You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reflection lets you interact with code by `name` instead of by `type`. Imagine you’ve written a simple function,
10
9
```c++
11
10
std::string complexToStr(float real, float img);
@@ -23,7 +22,6 @@ if(cToStr) { // Function materialized?
23
22
*Just run-time lookup and type-safe invocation*.
24
23
25
24
### ⚡ Performance!
26
-
27
25
Overhead? Practically none. **RTL**’s reflective calls — when return and argument types are known — are just a native function-pointer hop, often faster than `std::function`.
28
26
29
27
Yes — `rtl::function` is faster than `std::function`.
@@ -32,7 +30,6 @@ Microbenchmarks show reflective invocations through `rtl::function` have lower c
32
30
Once the functions start doing real work, both perform identically — always, under all conditions.
33
31
34
32
### 💡 In One Line
35
-
36
33
***"RTL is a lightweight, static library that enables a robust, type-safe run-time reflection system for C++ — as flexible as in managed languages, yet as close as possible to native performance."***
37
34
38
35
## What’s more?
@@ -131,19 +128,19 @@ RTL doesn’t invent a new paradigm — it extends C++ itself. You create object
131
128
132
129
## Reflection Features
133
130
134
-
* ✅ **Function Reflection**🔧 – Register and invoke C-style functions, supporting all kinds of overloads.
135
-
* ✅ **Class and Struct Reflection**🏗️ – Register and dynamically reflect their methods, constructors, and destructors.
136
-
* ✅ **Complete Constructor Support**🏗️:
131
+
* ✅ **Function Reflection** – Register and invoke C-style functions, supporting all kinds of overloads.
132
+
* ✅ **Class and Struct Reflection** – Register and dynamically reflect their methods, constructors, and destructors.
133
+
* ✅ **Complete Constructor Support** :
137
134
* Default construction.
138
135
* Copy/Move construction.
139
136
* Any overloaded constructor.
140
137
141
-
* ✅ **Allocation Strategies & Ownership**📂:
138
+
* ✅ **Allocation Strategies & Ownership** :
142
139
* Choose between `Heap` or `Stack` allocation.
143
140
* Automatic move semantics for ownership transfers.
144
141
* Scope-based destruction for `Heap` allocated instances.
145
142
146
-
* ✅ **Member Function Invocation**🎯:
143
+
* ✅ **Member Function Invocation** :
147
144
* Static methods.
148
145
* Const/Non-const methods.
149
146
* Any overloaded method, Const/Non-Const based as well.
@@ -182,10 +179,12 @@ To build, use any IDE applicable to the generator, or build straight from CMake:
182
179
cmake --build .
183
180
```
184
181
185
-
Run the **CxxRTLTestApplication** binary generated in the `../bin` folder. *(Tested MSVC-19, GCC-14 & Clang-19)*
186
-
* See `CxxTestRegistration/src/MyReflectionTests/` for introductory type registration & reflective programming examples.
187
-
* See `CxxRTLTestApplication/src` for detailed test cases.
188
-
182
+
Run the `RTLTestRunApp` or `RTLBenchmarkApp` binaries generated in the `bin/` directory. (Tested with MSVC 19, GCC 14, and Clang 19)
183
+
* See `CxxTestRegistration/src/MyReflectionTests/` for introductory examples of type registration and reflective programming.
184
+
* See `RTLTestRunApp/src` for detailed test cases.
185
+
* See `RTLBenchmarkApp/src` for benchmarking implementations.
186
+
* Run `run_benchmarks.sh` to perform automated benchmarking, from micro-level tests to scaled workloads.
187
+
189
188
## Contributions
190
189
191
190
Contributions welcome! Report bugs, request features, or submit PRs on GitHub.
0 commit comments