VLink  2.0.0
A high-performance communication middleware
vlink::MoveFunction< SignatureT, SboSizeT > Class Template Reference

Move-only type-erased callable analogue of std::move_only_function with pool spill. More...

#include <functional.h>

Inheritance diagram for vlink::MoveFunction< SignatureT, SboSizeT >:
Collaboration diagram for vlink::MoveFunction< SignatureT, SboSizeT >:

Detailed Description

template<typename SignatureT, size_t SboSizeT = 64U>
class vlink::MoveFunction< SignatureT, SboSizeT >

Move-only type-erased callable analogue of std::move_only_function with pool spill.

Holds any move-constructible target invocable as ReturnT(ArgsT...). Shares the SBO and MemoryPool fallback used by Function. Diverges from std::move_only_function in two deliberate ways and extends it in one: empty calls throw std::bad_function_call instead of being UB; only the unqualified signature is specialised (cv / ref / noexcept forms hard- fail); and RTTI inspection through target_type / target is provided. operator() is non-const so mutating targets such as std::packaged_task work directly without the logical-const dance. Move operations and swap are noexcept; copy is deleted.

Template Parameters
ReturnTResult type of the invocable target.
ArgsTArgument types of the invocable target.
SboSizeTInline storage budget in bytes; must be >= sizeof(void*).

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