c++ - 来自 enable_shared_from_this 的子类

标签 c++ boost boost-asio shared-ptr weak-ptr

我有一个 generic_connection

class generic_connection: public boost::enable_shared_from_this<generic_connection>

现在我想继承它并创建

class agent_connection: public generic_connection

agent_connection需要从 boost::enable_shared_from_this<agent_connection> 派生又是?

最佳答案

没有。

关于c++ - 来自 enable_shared_from_this 的子类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29668062/

相关文章:

c++ - boost::noncopyable 有什么优点

c++ - 努力将 vector<char> 转换为 wstring

c++ - 异步等待直到套接字可用于在 Asio 中读/写

c++ - boost::asio::async_read 在不满足完成条件的情况下结束

c++ - 带有 Boost::Beast 的 SSL 隧道

c++ - 复杂类的值类型,或类本身

c++ - 使用 boost::scoped_lock(Mutex &mx, bool initially_locked) 构造函数给我错误

C++:将自身结构的地址作为参数传递给 pthread_create 时出错:什么覆盖了我的数据?

c++ - 将数组转换为 vector 的最简单方法是什么?

c++ - 将 setw 与用户定义的 ostream 运算符一起使用