This is a question not addressed in the cheatsheet, as far as I can tell... I asked a question two weeks ago on the forum, but haven't seen any responses there -- sorry for the repeat posting. That ...
But as we all know, std::function uses type erasure under the hood, which renders this approach inefficient for high performance needs: The size of a class (in this case std::function<R(Ts...)>) is ...