VK
второй ответ Only use std::function if you really need a systematic way of organizing a heterogeneous collection of callable entities, such as functions, functors, capturing lambdas and bind expressions.
Etl- embedded template library.
https://www.etlcpp.com/

