Simple-Web-Server icon indicating copy to clipboard operation
Simple-Web-Server copied to clipboard

【warning C4996】Why is there such a warning?

Open webees opened this issue 6 years ago • 5 comments

warning C4996

'boost::asio::basic_socket<Protocol>::cancel': By default, this function always fails with operation_not_supported when used on Windows XP, Windows Server 2003, or earlier. Consult documentation for details.

test C:\lib\simplewebserver\client_http.hpp 129

webees avatar May 10 '18 06:05 webees

I'm no help on Windows, but these systems sounds pretty old. At some point, there will be systems that we cannot support, sorry.

eidheim avatar May 12 '18 11:05 eidheim

I am in win10, vs2017.

webees avatar May 12 '18 12:05 webees

Aha, so this is a warning since cancel with error code is deprecated. I'll have to look into all the changes that has been made, and other deprecations that have been made. I know that also asio::io_service has been renamed to asio::io_context.

Will look through this during the summer, and make the necessary changes to remove deprecated warnings and still support older systems.

eidheim avatar May 13 '18 10:05 eidheim

Deprecation of https://www.boost.org/doc/libs/1_67_0/doc/html/boost_asio/reference/basic_waitable_timer/cancel/overload2.html seems like an error to me though, since this is not deprecated: https://www.boost.org/doc/libs/1_67_0/doc/html/boost_asio/reference/basic_stream_socket/cancel/overload2.html

eidheim avatar May 13 '18 10:05 eidheim

Thank you for your help.

webees avatar May 15 '18 04:05 webees