Helios Engine 0.1.0
A modular ECS based data-oriented C++23 game engine
 
Loading...
Searching...
No Matches
helios::Delegate< FunctionSignature > Class Template Reference

Type-erased callable wrapper for free and member functions. More...

Detailed Description

template<typename FunctionSignature>
class helios::Delegate< FunctionSignature >

Type-erased callable wrapper for free and member functions.

Delegate is a lightweight, non-owning wrapper for:

  • Free functions
  • Member functions (including const and virtual)

It does not allocate and stores only:

  • A raw instance pointer (for member functions, may be null for free functions)
  • A function pointer to a small thunk that performs the actual call

The delegate is intentionally minimal and exception-free. It returns default-constructed values when empty (for non-void return types) and is a no-op for void return types.

Template Parameters
FunctionSignatureFunction type in the form R(Args...).

Definition at line 85 of file delegate.hpp.