|
VLink
2.0.0
A high-performance communication middleware
|
Copyable type-erased callable analogue of std::function with a tunable SBO and pool spill.
More...
#include <functional.h>
Copyable type-erased callable analogue of std::function with a tunable SBO and pool spill.
Holds any copy-constructible target invocable as ReturnT(ArgsT...). Default-instantiated Function uses a 64-byte SBO; Function<Sig, N> picks an arbitrary inline budget. operator() is const (matching std::function 's logical-const convention – the placement-newed target itself is non-const, so the const_cast pattern inside the invoker is well-defined). Empty construction, nullptr-from-nullptr, and the std::bad_function_call empty-call exception all match std::function. Copy operations follow copy-and-swap and provide the strong exception guarantee; move construction, move assignment and swap are noexcept.
| ReturnT | Result type of the invocable target. |
| ArgsT | Argument types of the invocable target. |
| SboSizeT | Inline storage budget in bytes; must be >= sizeof(void*). |