Dar*_*row 5 c++ boost boost-asio
我正在使用 Boost.Asio 开发 TCP/IP 程序,但出现错误:
note: see declaration of 'std::allocator<void>' 1>d:\hardware\libraries\visual studio 2017\x64\include\boost\asio\use_future.hpp(137): error C4996: 'std::allocator<void>': warning STL4009: std::allocator<void> is deprecated in C++17. You can define
_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
Run Code Online (Sandbox Code Playgroud)
阅读错误后,我明白我已经定义了
_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING
或者
_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
Run Code Online (Sandbox Code Playgroud)
我在 Configuration Properties -> C/C++ -> General -> Additional #using Directories 中定义了一次,但错误仍然存在。
然后我在包含任何头文件之前 #defined 主文件中的宏,但错误仍然存在。
然后我在我的每个编译的牧羊人中声明了宏,但错误仍然存在。
我什至尝试了 2 种不同的增强包。一个安装了 vcpkg 包管理器和一个预填充二进制文件。
MSVC 14.1 x64 增强:1.68 (x64)
| 归档时间: |
|
| 查看次数: |
2618 次 |
| 最近记录: |