VLink  2.0.0
A high-performance communication middleware
vlink::MoveFunction< SignatureT, SboSizeT > 模板类 参考

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

#include <functional.h>

类 vlink::MoveFunction< SignatureT, SboSizeT > 继承关系图:
vlink::MoveFunction< SignatureT, SboSizeT > 的协作图:

详细描述

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.

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

该类的文档由以下文件生成: