Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8063721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:08:21+00:00 2026-06-05T11:08:21+00:00

I am going through this boost tutorial on http://gwenael-dunand.developpez.com/tutoriels/cpp/boost/asio/ and It is giving me

  • 0

I am going through this boost tutorial on http://gwenael-dunand.developpez.com/tutoriels/cpp/boost/asio/ and It is giving me loads of error on

boost::bind(&tcp_server::handle_accept, this, new_connection, boost::asio::placeholders::error);

I am using it here

m_acceptor.async_accept(new_connection.socket(), boost::bind(&tcp_server::handle_accept, this, new_connection, boost::asio::placeholders::error));

I am getting this huge error for prsence of this line

In file included from /usr/include/boost/asio/basic_socket.hpp:24,                                                                                                                                                              
                 from /usr/include/boost/asio/basic_datagram_socket.hpp:25,
                 from /usr/include/boost/asio.hpp:20,
                 from /home/dipro/Development/asio/main.cpp:5:
/usr/include/boost/noncopyable.hpp: In copy constructor ‘boost::asio::basic_io_object<boost::asio::stream_socket_service<boost::asio::ip::tcp> >::basic_io_object(const boost::asio::basic_io_object<boost::asio::stream_socket_service<boost::asio::ip::tcp> >&)’:
/usr/include/boost/noncopyable.hpp:27: error: ‘boost::noncopyable_::noncopyable::noncopyable(const boost::noncopyable_::noncopyable&)’ is private
/usr/include/boost/asio/basic_io_object.hpp:30: error: within this context
In file included from /usr/include/boost/asio/datagram_socket_service.hpp:33,
                 from /usr/include/boost/asio/basic_datagram_socket.hpp:26,
                 from /usr/include/boost/asio.hpp:20,
                 from /home/dipro/Development/asio/main.cpp:5:
/usr/include/boost/noncopyable.hpp: In copy constructor ‘boost::asio::detail::reactive_socket_service<boost::asio::ip::tcp, boost::asio::detail::epoll_reactor<false> >::implementation_type::implementation_type(const boost::asio::detail::reactive_socket_service<boost::asio::ip::tcp, boost::asio::detail::epoll_reactor<false> >::implementation_type&)’:
/usr/include/boost/noncopyable.hpp:27: error: ‘boost::noncopyable_::noncopyable::noncopyable(const boost::noncopyable_::noncopyable&)’ is private
/usr/include/boost/asio/detail/reactive_socket_service.hpp:58: error: within this context
In file included from /usr/include/boost/asio/basic_socket.hpp:24,
                 from /usr/include/boost/asio/basic_datagram_socket.hpp:25,
                 from /usr/include/boost/asio.hpp:20,
                 from /home/dipro/Development/asio/main.cpp:5:
/usr/include/boost/asio/basic_io_object.hpp: In copy constructor ‘boost::asio::basic_io_object<boost::asio::stream_socket_service<boost::asio::ip::tcp> >::basic_io_object(const boost::asio::basic_io_object<boost::asio::stream_socket_service<boost::asio::ip::tcp> >&)’:
/usr/include/boost/asio/basic_io_object.hpp:30: note: synthesized method ‘boost::asio::detail::reactive_socket_service<boost::asio::ip::tcp, boost::asio::detail::epoll_reactor<false> >::implementation_type::implementation_type(const boost::asio::detail::reactive_socket_service<boost::asio::ip::tcp, boost::asio::detail::epoll_reactor<false> >::implementation_type&)’ first required here 
In file included from /usr/include/boost/asio/basic_datagram_socket.hpp:25,
                 from /usr/include/boost/asio.hpp:20,
                 from /home/dipro/Development/asio/main.cpp:5:
/usr/include/boost/asio/basic_socket.hpp: In copy constructor ‘boost::asio::basic_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >::basic_socket(const boost::asio::basic_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >&)’:
/usr/include/boost/asio/basic_socket.hpp:45: note: synthesized method ‘boost::asio::basic_io_object<boost::asio::stream_socket_service<boost::asio::ip::tcp> >::basic_io_object(const boost::asio::basic_io_object<boost::asio::stream_socket_service<boost::asio::ip::tcp> >&)’ first required here 
In file included from /usr/include/boost/asio.hpp:28,
                 from /home/dipro/Development/asio/main.cpp:5:
/usr/include/boost/asio/basic_stream_socket.hpp: In copy constructor ‘boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >::basic_stream_socket(const boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >&)’:
/usr/include/boost/asio/basic_stream_socket.hpp:49: note: synthesized method ‘boost::asio::basic_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >::basic_socket(const boost::asio::basic_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >&)’ first required here 
/home/dipro/Development/asio/main.cpp: In copy constructor ‘tcp_connection::tcp_connection(const tcp_connection&)’:
/home/dipro/Development/asio/main.cpp:9: note: synthesized method ‘boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >::basic_stream_socket(const boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >&)’ first required here 
/home/dipro/Development/asio/main.cpp: In member function ‘void tcp_server::start_accept()’:
/home/dipro/Development/asio/main.cpp:39: note: synthesized method ‘tcp_connection::tcp_connection(const tcp_connection&)’ first required here 
/home/dipro/Development/asio/main.cpp:39: error:   initializing argument 3 of ‘boost::_bi::bind_t<R, boost::_mfi::mf2<R, T, A1, A2>, typename boost::_bi::list_av_3<A1, A2, A3>::type> boost::bind(R (T::*)(B1, B2), A1, A2, A3) [with R = void, T = tcp_server, B1 = tcp_connection&, B2 = const boost::system::error_code&, A1 = tcp_server*, A2 = tcp_connection, A3 = boost::arg<1> (*)()]’
make[2]: *** [CMakeFiles/asio.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/asio.dir/all] Error 2
make: *** [all] Error 2
dipro@bong:~/Development/asio/build$ 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T11:08:23+00:00Added an answer on June 5, 2026 at 11:08 am

    There seems to be an error on that tutorial. The argument new_connection is taken by reference so the bind needs to use boost::ref, otherwise it will try to copy it and as the error shows the type is noncopyable. Change your bind to:

    boost::bind(
        &tcp_server::handle_accept
      , this
      , boost::ref(new_connection) // << pass by reference
      , boost::asio::placeholders::error);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm going through this tutorial: http://tutorials.jumpstartlab.com/projects/jsattend.html In iteration 7, step 3 we get to
I was going through this tutorial http://www.schillmania.com/content/projects/javascript-animation-1/ and when I institute the code, I
I am going through this WPF tutorial http://blogs.vertigo.com/personal/alanl/Blog/Lists/Posts/Post.aspx?ID=18 and I have a question about
I was going through this article today. http://vinothbabu.com/2010/05/08/update-and-insert-differences-in-syntax-is-an-inconvenience/ I was not able to understand
I was going through this tutorial in order to learn how Django works: https://docs.djangoproject.com/en/dev/intro/tutorial01/
I was going through this link below: http://support.microsoft.com/kb/819267 Here it explains to enable HTTP
I'm going through this tutorial from droid draw: http://www.droiddraw.org/tutorial3.html I'm getting this error when
I am going through this tutorial http://www.9lessons.info/2009/04/exactly-twitter-like-follow-and-remove.html on how to implement a twitter-like follow/unfollow
I was going through this: http://code.google.com/apis/webfonts/ (Which BTW I think is fantastic) And was
Going through this tutorial https://developers.google.com/web-toolkit/doc/latest/tutorial/RPC it is mentioned that to set up a call

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.