Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Due to the large number of templates instantiated, the error messages are quite long, but most of it is giving what could be helpful context. I've taken the first error and snipped the excessively long lines.</p> <p>First the compiler says where the error is, and what sequence of template instantiations resulted in the particular template instance the resulted in the error to be instantiated.</p> <pre><code>/usr/include/boost/bind.hpp: In member function ‘void boost::_bi::list3&lt;A1, A2, A3&gt;::operator()(boost::_bi::type&lt;void&gt;, F&amp;, A&amp;, int) ... /usr/include/boost/bind/bind_template.hpp:61: instantiated from ... /usr/include/asio/detail/bind_handler.hpp:95: instantiated from ... /usr/include/asio/handler_invoke_hook.hpp:62: instantiated from ... /usr/include/asio/detail/handler_invoke_helpers.hpp:39: instantiated from ... /usr/include/asio/detail/bind_handler.hpp:129: instantiated from ... /usr/include/asio/detail/handler_invoke_helpers.hpp:39: instantiated from ... /usr/include/asio/detail/handler_queue.hpp:191: instantiated from ... /usr/include/asio/detail/handler_queue.hpp:171: instantiated from ... /usr/include/asio/detail/handler_alloc_helpers.hpp:137: instantiated from ... /usr/include/asio/detail/handler_queue.hpp:116: instantiated from ... /usr/include/asio/detail/task_io_service.hpp:190: instantiated from ... /usr/include/asio/impl/io_service.ipp:125: instantiated from ... /usr/include/asio/detail/reactive_socket_service.hpp:1376: instantiated from ... /usr/include/asio/datagram_socket_service.hpp:310: instantiated from ... /usr/include/asio/basic_datagram_socket.hpp:756: instantiated from ... </code></pre> <p>And here is the line of your code that resulted in all that happening:</p> <pre><code>../src/msgSrv/msgSrv.cpp:37: instantiated from here </code></pre> <p>And here is the real error:</p> <pre><code>/usr/include/boost/bind.hpp:348: error: no match for call to ‘(boost::_mfi::mf2&lt;void, msgSrv::msgSrv, boost::system::error_code&amp;, unsigned int&gt;) (msgSrv::msgSrv*&amp;, asio::error::basic_errors&amp;, int&amp;)’ /usr/include/boost/bind/mem_fn_template.hpp:272: note: candidates are: R boost::_mfi::mf2&lt;R, T, A1, A2&gt;::operator()(T*, A1, A2) const [with R = void, T = msgSrv::msgSrv, A1 = boost::system::error_code&amp;, A2 = unsigned int] /usr/include/boost/bind/mem_fn_template.hpp:291: note: R boost::_mfi::mf2&lt;R, T, A1, A2&gt;::operator()(T&amp;, A1, A2) const [with R = void, T = msgSrv::msgSrv, A1 = boost::system::error_code&amp;, A2 = unsigned int] </code></pre> <p>For the purposes of argument passing, <code>msgSrv::msgSrv*&amp;</code> will convert to <code>msgSrv::msgSrv*</code>, but the <code>A1</code> parameter is a reference and <code>boost::system::error_code</code> and <code>asio::error::basic_errors</code> are not <em>reference-compatible</em>.</p> <p><strong>Edit:</strong></p> <p>If you read the type requirements for a <a href="http://www.boost.org/doc/libs/1_39_0/doc/html/boost_asio/reference/ReadHandler.html" rel="noreferrer">read handler</a>, you'll see that the handler has work with a first parameter that is <em>l-value</em> of type <code>const error_code</code>. This means that your first parameter has to be either <code>const boost::system::error_code&amp;</code> (i.e. a const reference) or <code>boost::system::error_code</code>, a non-reference parameter.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload