id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 4859,"boost/asio/detail/impl/socket_ops.ipp:122 produces ""expression is always true"" compile error on MS Visual Studio 2008",Kris Nobes ,chris_kohlhoff,"In boost/asio/detail/impl/socket_ops.ipp from boost_1_45_0_beta1 built with Microsoft Visual C++ compiler 2008, the following error is produced: {{{ boost/asio/detail/impl/socket_ops.ipp(122): error C4296: '>=' : expression is always true }}} This is associated with the following block of code: {{{ // Try to complete the operation without blocking. socket_type new_socket = socket_ops::accept(s, addr, addrlen, ec); // Check if operation succeeded. if (new_socket >= 0) return new_socket; }}} socket_type is defined in socket_types.hpp, which on Windows is: {{{ typedef SOCKET socket_type; }}} SOCKET is defined in winsock.h/winsock2.h as: {{{ typedef UINT_PTR SOCKET; }}} It would seem that new_socket should be compared to invalid_socket (defined in socket_types.hpp, line 86), which is the same test performed elsewhere in this file. The patch attached will produce this change but I'd like confirmation that the problem and solution are valid. Also in: * branches/release/boost/asio/detail/impl/socket_ops.ipp @ 66173 * trunk/boost/asio/detail/impl/socket_ops.ipp @ 66611 ",Bugs,closed,To Be Determined,asio,Boost Release Branch,Problem,fixed,,