StormByte 3.0.0
C++26 foundation of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Safe::Function< Signature > Class Template Reference

Copyable, creator-context callback with a typed signature. More...

#include <StormByte/safe/function.hxx>

Detailed Description

template<typename Signature>
class StormByte::Safe::Function< Signature >

Copyable, creator-context callback with a typed signature.

Template Parameters
SignatureCallback signature, such as void(double) or Size(Size).

The callback context is destroyed by its creator-module Release function. Call returns Status for ordinary failures; value-returning signatures receive caller-owned result storage explicitly. Call propagates StormByte::Exception unchanged. Other exceptions are converted to Status::Failure. The provider must keep its callback implementation valid until the function is destroyed.

Value arguments are passed for the duration of the call. Const-reference arguments are borrowed only until Call returns and must not be retained by the provider. Function pointers use the platform's default C++ calling convention. Participants must use a compatible C++ ABI and calling convention. The provider module and Base must remain loaded until the callback is destroyed. Invocation thread safety and reentrancy are provider responsibilities. A callback must not destroy itself while running. This is not std::function.


The documentation for this class was generated from the following file: