Changing to std::function.