3232#include < vector>
3333#include < iterator>
3434#include < mutex>
35- #include < boost/bind.hpp>
35+ // #include <boost/bind.hpp>
36+ #include < functional>
3637#include < network/constants.hpp>
3738
3839#ifndef NETWORK_HTTP_SERVER_CONNECTION_HEADER_BUFFER_MAX_SIZE
@@ -213,7 +214,7 @@ class async_server_connection
213214 }
214215
215216write_headers_only (
216- boost ::bind (&async_server_connection::do_nothing,
217+ std ::bind (&async_server_connection::do_nothing,
217218async_server_connection::shared_from_this ()));
218219 }
219220
@@ -279,7 +280,7 @@ class async_server_connection
279280 input_range input =boost::make_iterator_range (new_start,
280281 read_buffer_.end ());
281282thread_pool ()
282- .post (boost ::bind (callback,
283+ .post (std ::bind (callback,
283284 input,
284285boost::system::error_code (),
285286std::distance (new_start, data_end),
@@ -290,7 +291,7 @@ class async_server_connection
290291
291292socket ().async_read_some (
292293boost::asio::buffer (read_buffer_),
293- strand.wrap (boost ::bind (&async_server_connection::wrap_read_handler,
294+ strand.wrap (std ::bind (&async_server_connection::wrap_read_handler,
294295async_server_connection::shared_from_this (),
295296 callback,
296297 boost::asio::placeholders::error,
@@ -315,7 +316,7 @@ class async_server_connection
315316 data_end = read_buffer_.begin ();
316317std::advance (data_end, bytes_transferred);
317318thread_pool ()
318- .post (boost ::bind (callback,
319+ .post (std ::bind (callback,
319320boost::make_iterator_range (data_start, data_end),
320321 ec,
321322 bytes_transferred,
@@ -371,7 +372,7 @@ class async_server_connection
371372void read_more (state_t state) {
372373 socket_.async_read_some (
373374boost::asio::buffer (read_buffer_),
374- strand.wrap (boost ::bind (&async_server_connection::handle_read_data,
375+ strand.wrap (std ::bind (&async_server_connection::handle_read_data,
375376async_server_connection::shared_from_this (),
376377 state,
377378 boost::asio::placeholders::error,
@@ -473,7 +474,7 @@ class async_server_connection
473474 }
474475 new_start =boost::end (result_range);
475476thread_pool ()
476- .post (boost ::bind (handler,
477+ .post (std ::bind (handler,
477478boost::cref (request_),
478479async_server_connection::shared_from_this ()));
479480return ;
@@ -502,7 +503,7 @@ class async_server_connection
502503boost::asio::async_write (
503504socket (),
504505boost::asio::buffer (bad_request,strlen (bad_request)),
505- strand.wrap (boost ::bind (&async_server_connection::client_error_sent,
506+ strand.wrap (std ::bind (&async_server_connection::client_error_sent,
506507async_server_connection::shared_from_this (),
507508 boost::asio::placeholders::error,
508509 boost::asio::placeholders::bytes_transferred)));
@@ -528,7 +529,7 @@ class async_server_connection
528529boost::asio::async_write (
529530socket (),
530531 headers_buffer,
531- strand.wrap (boost ::bind (&async_server_connection::handle_write_headers,
532+ strand.wrap (std ::bind (&async_server_connection::handle_write_headers,
532533async_server_connection::shared_from_this (),
533534 callback,
534535 boost::asio::placeholders::error,
@@ -561,7 +562,7 @@ class async_server_connection
561562 boost::system::error_codeconst & ec,
562563 std::size_t bytes_transferred) {
563564// we want to forget the temporaries and buffers
564- thread_pool ().post (boost ::bind (callback, ec));
565+ thread_pool ().post (std ::bind (callback, ec));
565566 }
566567
567568template <class Range >
@@ -621,7 +622,7 @@ class async_server_connection
621622 std::function<void (boost::system::error_code)> callback_function = callback;
622623
623624 std::function<void ()> continuation =
624- boost ::bind (
625+ std ::bind (
625626 &async_server_connection::template write_vec_impl<
626627 ConstBufferSeq,
627628 std::function<void (
@@ -643,7 +644,7 @@ class async_server_connection
643644boost::asio::async_write (
644645 socket_,
645646 seq,
646- boost ::bind (&async_server_connection::handle_write,
647+ std ::bind (&async_server_connection::handle_write,
647648async_server_connection::shared_from_this (),
648649 callback_function,
649650 temporaries,