|
VLink
2.0.0
A high-performance communication middleware
|
Move-only type-erased callable analogue of std::move_only_function with pool spill.
更多...
#include <functional.h>
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.
| ReturnT | Result type of the invocable target. |
| ArgsT | Argument types of the invocable target. |
| SboSizeT | Inline storage budget in bytes; must be >= sizeof(void*). |