I am developing TCP/IP program using Boost.Asio but I am getting error :
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.
After reading the error I understood that I have define
_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING
or
_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
I define them once in Configuration Properties -> C/C++ -> General -> Additional #using Directories but error is still persistent.
Then I #defined booth the macros in main file before including any header but still the error persisted.
Then I declared the macro in my per-compiled herder but the error still persisted.
I even tried 2 different boost packages. One installed with vcpkg package manager and one pre-fill binary.
MSVC 14.1 x64 Boost : 1.68 (x64)
Just Turning off "SDL checks" is all you need. Detail: property page of current project> 'c/c++'>'General'>'SDL checks' (VS2019, Win10 X64; 2021/01/27)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With