Pass all std::function arguments by const reference