fixed compilation error for function with std::function as parameter