You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build using CMake with gcc 5.2 and Boost 1.58 and having a problem where the type definition for the handler doesn't match the actual function implementation and that causes a compiler error.
and binds it to a finished handler using: my_reader_ptr = request_reader::create(tcp_conn, boost::bind(&server::handle_request, this, _1, _2, _3));
However, request_reader.hpp defines the finished_handler_t as: typedef boost::function3<void, http::request_ptr, tcp::connection_ptr, const boost::system::error_code&> finished_handler_t;
Notice that server::handle_request has the 2nd and 3rd parameters defined as references but finished_handler_t does not. I can get rid of the error by modifying finished_handler_t to use references but I'm a lowly C programmer so I don't know if that's the correct solution. To further my doubt, the same problem is in tcp_server.cpp but the fix does not work there since the handler is eventually called using shared_from_this() and that causes an entirely different problem.
I'm trying to build using CMake with gcc 5.2 and Boost 1.58 and having a problem where the type definition for the handler doesn't match the actual function implementation and that causes a compiler error.
Specifically, http_server.cpp implements:
void server::handle_request(http::request_ptr& http_request_ptr, tcp::connection_ptr& tcp_conn, const boost::system::error_code& ec)
and binds it to a finished handler using:
my_reader_ptr = request_reader::create(tcp_conn, boost::bind(&server::handle_request, this, _1, _2, _3));
However, request_reader.hpp defines the finished_handler_t as:
typedef boost::function3<void, http::request_ptr, tcp::connection_ptr, const boost::system::error_code&> finished_handler_t;
Notice that
server::handle_request
has the 2nd and 3rd parameters defined as references butfinished_handler_t
does not. I can get rid of the error by modifyingfinished_handler_t
to use references but I'm a lowly C programmer so I don't know if that's the correct solution. To further my doubt, the same problem is in tcp_server.cpp but the fix does not work there since the handler is eventually called using shared_from_this() and that causes an entirely different problem.log.do_configure.txt
log.do_compile.txt
The text was updated successfully, but these errors were encountered: