|
KiCad PCB EDA Suite
|
A std::function-style callable wrapper that stores the target in a fixed inline buffer and never allocates on the heap. More...
A std::function-style callable wrapper that stores the target in a fixed inline buffer and never allocates on the heap.
std::function heap-allocates whenever the callable exceeds its small-buffer size (~16 bytes on libstdc++), which dominates hot paths that build a short-lived closure per call. INPLACE_FUNCTION keeps the closure inline, trading a compile-time size cap for the elimination of those allocations.
The stored callable must be nothrow-move-constructible and no larger than Capacity bytes; either violation is a compile error.
Definition at line 42 of file inplace_function.h.