title: boost::asio async_read_some async_read_until Compiler Warning
body: <p>I am using the following methods:</p>
  
  <pre><code>boost::asio::streambuf io_bufstream;
  
  boost::asio::async_read_until(socket_, io_bufstream, "&lt;/message&gt;", 
      strand_.wrap(
      boost::bind(&amp;Connection::handleRead, shared_from_this(),
      boost::asio::placeholders::error,
      boost::asio::placeholders::bytes_transferred)));//warning: line 36
  
  
  boost::array&lt;char, 8192&gt; buffer_    
  socket_.async_read_some(boost::asio::buffer(buffer_),
      strand_.wrap(
      boost::bind(&amp;Connection::handleRead, shared_from_this(),
      boost::asio::placeholders::error,
      boost::asio::placeholders::bytes_transferred))); // warning
  </code></pre>
  
  <p>I get the following warning:</p>
  
  <pre><code>C:\dev\sapphire\boost_1_46_1\boost/asio/detail/reactive_socket_recv_op.hpp(58) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
  </code></pre>
  
  <p>Here is the complete output as well:</p>
  
  <pre><code>C:\dev\sapphire\boost_1_46_1\boost/asio/detail/reactive_socket_recv_op.hpp(58) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
          C:\dev\sapphire\boost_1_46_1\boost/asio/detail/reactive_socket_recv_op.hpp(48) : while compiling class template member function 'bool boost::asio::detail::reactive_socket_recv_op_base::do_perform(boost::asio::detail::reactor_op *)'
          with
          [
              MutableBufferSequence=boost::asio::mutable_buffers_1
          ]
          C:\dev\sapphire\boost_1_46_1\boost/asio/detail/reactive_socket_recv_op.hpp(71) : see reference to class template instantiation 'boost::asio::detail::reactive_socket_recv_op_base' being compiled
          with
          [
              MutableBufferSequence=boost::asio::mutable_buffers_1
          ]
          C:\dev\sapphire\boost_1_46_1\boost/asio/detail/reactive_socket_service_base.hpp(227) : see reference to class template instantiation 'boost::asio::detail::reactive_socket_recv_op' being compiled
          with
          [
              MutableBufferSequence=boost::asio::mutable_buffers_1,
              Handler=boost::asio::detail::wrapped_handler,boost::_bi::list3&gt;,boost::arg&lt;1&gt;,boost::arg&lt;2&gt;&gt;&gt;&gt;
          ]
          C:\dev\sapphire\boost_1_46_1\boost/asio/stream_socket_service.hpp(263) : see reference to function template instantiation 'void boost::asio::detail::reactive_socket_service_base::async_receive(boost::asio::detail::reactive_socket_service_base::base_implementation_type &amp;,const MutableBufferSequence &amp;,boost::asio::socket_base::message_flags,Handler)' being compiled
          with
          [
              MutableBufferSequence=boost::asio::mutable_buffers_1,
              ReadHandler=boost::asio::detail::wrapped_handler,boost::_bi::list3&gt;,boost::arg&lt;1&gt;,boost::arg&lt;2&gt;&gt;&gt;&gt;,
              Handler=boost::asio::detail::wrapped_handler,boost::_bi::list3&gt;,boost::arg&lt;1&gt;,boost::arg&lt;2&gt;&gt;&gt;&gt;
          ]
          C:\dev\sapphire\boost_1_46_1\boost/asio/basic_stream_socket.hpp(708) : see reference to function template instantiation 'void boost::asio::stream_socket_service::async_receive(boost::asio::detail::reactive_socket_service::implementation_type &amp;,const MutableBufferSequence &amp;,boost::asio::socket_base::message_flags,ReadHandler)' being compiled
          with
          [
              Protocol=boost::asio::ip::tcp,
              MutableBufferSequence=boost::asio::mutable_buffers_1,
              ReadHandler=boost::asio::detail::wrapped_handler,boost::_bi::list3&gt;,boost::arg&lt;1&gt;,boost::arg&lt;2&gt;&gt;&gt;&gt;
          ]
          ..\..\..\platform_epi\src\connection.cpp(36) : see reference to function template instantiation 'void boost::asio::basic_stream_socket::async_read_some&gt;(const MutableBufferSequence &amp;,ReadHandler)' being compiled
          with
          [
              Protocol=boost::asio::ip::tcp,
              Dispatcher=boost::asio::io_service::strand,
              Handler=boost::_bi::bind_t,boost::_bi::list3&gt;,boost::arg&lt;1&gt;,boost::arg&lt;2&gt;&gt;&gt;,
              MutableBufferSequence=boost::asio::mutable_buffers_1,
              ReadHandler=boost::asio::detail::wrapped_handler,boost::_bi::list3&gt;,boost::arg&lt;1&gt;,boost::arg&lt;2&gt;&gt;&gt;&gt;
          ]
  </code></pre>
  
  <p>From my understanding is that the error comes from line 36 but I don't understand what is happening. I think it has something to do with the bytes_transferred being used as a bool when it is int. If anyone could clarify on this issue and/or how to fix it, it would be superb!</p>
  
  <p>Thanks!</p>