plugify 1.2.8
|
Provides a storage area for return values in JIT/ABI contexts. More...
#include <callback.hpp>
Public Types | |
using | type = void |
Public Member Functions | |
ReturnSlot (type *data, size_t size) noexcept | |
Construct from byte storage. | |
template<typename T > requires std::is_trivially_copyable_v<T> | |
void | Set (const T &value) noexcept |
Set the return value. | |
template<typename T > requires std::is_trivially_copyable_v<T> | |
T | Get () const noexcept |
Get the return value. | |
template<typename T , typename... Args> | |
void | Construct (Args &&... args) noexcept(noexcept(T(std::forward< Args >(args)...))) |
Construct an object in-place. | |
Provides a storage area for return values in JIT/ABI contexts.
This class manages a memory region for return values, allowing safe reading, writing, and in-place construction of trivially copyable types. It is typically used to handle return values from dynamically generated functions.
Definition at line 221 of file callback.hpp.
using plugify::ReturnSlot::type = void |
Definition at line 223 of file callback.hpp.
|
inlineexplicitnoexcept |
Construct from byte storage.
data | Pointer to aligned byte storage |
size | Size in bytes |
Definition at line 230 of file callback.hpp.
|
inlinenoexcept |
Construct an object in-place.
T | Type to construct |
Args | Constructor argument types |
args | Constructor arguments |
Definition at line 269 of file callback.hpp.
|
inlinenoexcept |
Get the return value.
T | Type of the return value |
Definition at line 254 of file callback.hpp.
|
inlinenoexcept |
Set the return value.
T | Type of the return value |
value | Value to return |
Definition at line 242 of file callback.hpp.