crill-dev / crill

The crill library
Boost Software License 1.0
188 stars 9 forks source link

Add a non-allocating fixed capacity version of std::function #6

Open timuraudio opened 2 years ago

theuser27 commented 1 year ago

I remember seeing an implementation of this made by colugo, might be useful https://github.com/colugomusic/clog/blob/master/include/clog/small_function.hpp

shuhaowu commented 1 year ago

iceoryx also implements this: https://github.com/eclipse-iceoryx/iceoryx/blob/d3f97cb/iceoryx_hoofs/functional/include/iox/function.hpp#L26

In fact, all of iceoryx's cxx building block data structures may be of interest: https://iceoryx.io/v2.0.0/advanced/iceoryx_hoofs/#cxx.