std::function and std::unique_ptr usage.