class watch_dog { public: watch_dog(std::stop_token token) : m_token(token), m_callback(m_token, std::bind(&watch_dog::callback_proc, this)) { } private: void callback_proc() { std::cout << "an operation has completed." << std::endl; } std::stop_token m_token; std::...
stop_callback未被类型擦除;它是一个模板,存储了你要调用的可调用对象的确切类型。如果你想擦除存储...