Wrapper for function return values.
More...
#include <call.hpp>
|
template<typename T , typename... Args>
requires (sizeof(T) <= MaxSize && std::is_trivially_destructible_v<T>) |
void | Construct (Args &&... args) noexcept(noexcept(T(std::forward< Args >(args)...))) |
| Construct an object of type T in the return storage.
|
|
template<typename T >
requires (sizeof(T) <= MaxSize && std::is_trivially_copyable_v<T>) |
void | Set (T value) noexcept |
| Set the return value.
|
|
template<typename T >
requires (sizeof(T) <= MaxSize && std::is_trivially_copyable_v<T>) |
T | Get () const noexcept |
| Get the return value.
|
|
void | Clear () noexcept |
| Clear the return value storage.
|
|
|
static constexpr size_t | MaxSize = 2 * sizeof(SlotType) |
|
Wrapper for function return values.
Supports return values up to 128 bits (2 slots).
Definition at line 284 of file call.hpp.
◆ SlotType
using plugify::Return::SlotType = uint64_t |
◆ Clear()
void plugify::Return::Clear |
( |
| ) |
|
|
inlinenoexcept |
Clear the return value storage.
Definition at line 328 of file call.hpp.
◆ Construct()
template<typename T , typename... Args>
requires (sizeof(T) <= MaxSize && std::is_trivially_destructible_v<T>)
void plugify::Return::Construct |
( |
Args &&... |
args | ) |
|
|
inlinenoexcept |
Construct an object of type T in the return storage.
- Template Parameters
-
- Parameters
-
args | Arguments to forward to the constructor. |
Definition at line 296 of file call.hpp.
◆ Get()
template<typename T >
requires (sizeof(T) <= MaxSize && std::is_trivially_copyable_v<T>)
T plugify::Return::Get |
( |
| ) |
const |
|
inlinenoexcept |
Get the return value.
- Template Parameters
-
T | Type of the return value. |
- Returns
- The return value.
Definition at line 319 of file call.hpp.
◆ Set()
template<typename T >
requires (sizeof(T) <= MaxSize && std::is_trivially_copyable_v<T>)
void plugify::Return::Set |
( |
T |
value | ) |
|
|
inlinenoexcept |
Set the return value.
- Template Parameters
-
T | Type of the return value. |
- Parameters
-
Definition at line 307 of file call.hpp.
◆ MaxSize
constexpr size_t plugify::Return::MaxSize = 2 * sizeof(SlotType) |
|
staticconstexpr |
The documentation for this class was generated from the following file: