![]() |
Raven Engine v0.1
|
Type-erased callable wrapper with small buffer optimization (SBO). More...
#include <FixedFunction.h>
Type-erased callable wrapper with small buffer optimization (SBO).
| Signature | The function signature, e.g. void(int, float). |
| StorageSize | Inline storage size in bytes (default 64). |
Stores and invokes any callable matching the given signature. If the callable fits into inline storage (StorageSize) and meets alignment requirements, it is constructed in-place. Otherwise, a pointer to a heap-allocated callable is stored.
Designed as a move-only replacement for std::function in performance critical contexts (e.g., events, callbacks in Raven).