![]() |
MCRO
C++23 utilities for Unreal Engine.
|
__bases would be perfect for the job, but other popular compilers don't have similar intrinsics. Once such a feature becomes widely available base classes can be automatically added as aliases for types wrapped in FAny. OnCopiedAt and OnMovedAt doesn't seem reliable currently, the best would be if we could provide a safe way to keep components updated about their parents, with erasing the parent type on IComposable level, but keeping it fully typed with components.
C++ 26 has promising proposal for static value-based reflection, which can gather metadata from classes or even emit them. The best summary I found so far is a stack-overflow answer https://stackoverflow.com/a/77477029 Once that's available we can gather base classes in compile time, and do dynamic casting of objects without the need for intrusive extra syntax, or extra work at construction. Currently GCC's __bases would be perfect for the job, but other popular compilers don't have similar intrinsics. Once such a feature becomes widely available base classes can be automatically added as aliases for registered components.
__bases would be perfect for the job, but other popular compilers don't have similar intrinsics.