Use std::function instead of member-function-pointer.