c++ - error C2825: 'F': must be a class or namespace when followed by '::' -


i'm having bit of trouble analyzing cause of error in code. code looks fine, , other devs says fine:

void handle_read_headers(const boost::system::error_code& err, restclient::response& resp) {     if (!err)     {         // start reading remaining data until eof.         boost::asio::async_read(socket_, response_,             boost::asio::transfer_at_least(1),             boost::bind(&client::handle_read_content, this,             boost::asio::placeholders::error,             boost::asio::placeholders::bytes_transferred,             boost::ref(resp)));      } }  void handle_read_content(const boost::system::error_code& ec, size_t bytes_transferred, restclient::response& resp) {     if (!ec)     {         // write of data has been read far.         std::cout << &response_;          // continue reading remaining data until eof.         boost::asio::async_read(socket_, response_,             boost::asio::transfer_at_least(1),             boost::bind(&client::handle_read_content, this,             boost::asio::placeholders::error));     } } 

the whole source code can found here: http://bit.ly/1gnemqg

the error

error   1   error c2825: 'f': must class or namespace when followed '::'    c:\local\boost_1_58_0\boost\bind\bind.hpp   69  1   httpclientdemo error   2   error c2039: 'result_type' : not member of '`global namespace''    c:\local\boost_1_58_0\boost\bind\bind.hpp   69  1   httpclientdemo error   3   error c2146: syntax error : missing ';' before identifier 'type'    c:\local\boost_1_58_0\boost\bind\bind.hpp   69  1   httpclientdemo error   4   error c2208: 'boost::_bi::type' : no members defined using type    c:\local\boost_1_58_0\boost\bind\bind.hpp   69  1   httpclientdemo error   5   error c1903: unable recover previous error(s); stopping compilation c:\local\boost_1_58_0\boost\bind\bind.hpp   69  1   httpclientdemo 

what wrong in code?

within client::handle_read_content, call boost::bind missing arguments. should same in client::handle_read_headers:

boost::asio::async_read(socket_, response_,         boost::asio::transfer_at_least(1),         boost::bind(&client::handle_read_content, this,                     boost::asio::placeholders::error,                     boost::asio::placeholders::bytes_transferred, // line missing                      boost::ref(resp) // line missing          ) ); 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -