c++ - boost::asio::error 类不再存在

标签 c++ boost

我使用的是 C++ Boost 库 1.34.0;现在我要使用 Boost 1.55.0。但是,此版本中不再存在 boost::asio::error 类。

boost::asio::error 类的替代品是什么?我应该改用 boost::system::error_code 类吗?

最佳答案

暂时搁置Boost.Asio was not actually introduced until Boost 1.35.0 (所以你不可能在 Boost 1.34.0 中使用它),boost::asio::error never 作为一个类存在; it was a namespace in 1.35.0 containing a set of enums , 和 they're all still there today .

所以你不需要改变任何东西。

关于c++ - boost::asio::error 类不再存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23267173/

相关文章:

c++ - 使用 C++11 选项编译 C++98 代码时,由于 Boost header 导致的不明确重载

c++ - 为信号槽绑定(bind)模板函数时使用占位符

c++ - 如何创建 shared_ptr 以传递给采用 void * 的函数

c++ - 如何在C++中同步静态字段

c++ - Boost 错误 'assignment of read-only location' 和 'no matching function for call'(新安装)

c++ - 填充 boost vector 或矩阵

c++ - 在 sprintf 中添加错误的格式类型

c++ - 我们可以使用 pthread 库进行 opencv C++ 编程吗?

c++ - 无法使用 execlp 从管道读取

c++ - 找到一种正确的“(快速和准确的)方法来查找检查 2d 游戏碰撞的内容。c++