Skip to content

Fix compilation errors for projects using BOOST_BIND_NO_PLACEHOLDERS. #437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 6, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,14 @@ struct http_async_connection
resolve_(resolver_, host(request), port_,
request_strand_.wrap(boost::bind(
&this_type::handle_resolved, this_type::shared_from_this(),
port_, get_body, callback, generator, _1, _2)));
port_, get_body, callback, generator, boost::arg<1>(),
boost::arg<2>())));
if (timeout_ > 0) {
timer_.expires_from_now(boost::posix_time::seconds(timeout_));
timer_.async_wait(request_strand_.wrap(
boost::bind(&this_type::handle_timeout,
this_type::shared_from_this(),
_1)));
boost::arg<1>())));
}
return response_;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ struct http_sync_connection
timer_.expires_from_now(boost::posix_time::seconds(timeout_));
timer_.async_wait(boost::bind(&this_type::handle_timeout,
this_type::shared_from_this(),
_1));
boost::arg<1>()));
}
}

Expand Down
2 changes: 1 addition & 1 deletion boost/network/protocol/http/client/connection/sync_ssl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ struct https_sync_connection
timer_.expires_from_now(boost::posix_time::seconds(timeout_));
timer_.async_wait(boost::bind(&this_type::handle_timeout,
this_type::shared_from_this(),
_1));
boost::arg<1>()));
}
}

Expand Down
3 changes: 2 additions & 1 deletion boost/network/protocol/http/policies/async_connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ struct async_connection_policy : resolver_policy<Tag>::type {
follow_redirect_, always_verify_peer,
boost::bind(&async_connection_policy<Tag, version_major,
version_minor>::resolve,
this, _1, _2, _3, _4),
this, boost::arg<1>(), boost::arg<2>(),
boost::arg<3>(), boost::arg<4>()),
resolver, boost::iequals(protocol_, string_type("https")), timeout_,
certificate_filename, verify_path,
certificate_file, private_key_file));
Expand Down
18 changes: 9 additions & 9 deletions boost/network/protocol/http/policies/pooled_connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,20 +221,20 @@ struct pooled_connection_policy : resolver_policy<Tag>::type {
version_major,
version_minor>::resolve,
this,
_1,
_2,
_3),
boost::arg<1>(),
boost::arg<2>(),
boost::arg<3>()),
boost::bind(&pooled_connection_policy<Tag,
version_major,
version_minor>::get_connection,
this,
_1,
_2,
boost::arg<1>(),
boost::arg<2>(),
always_verify_peer,
_3,
_4,
_5,
_6),
boost::arg<3>(),
boost::arg<4>(),
boost::arg<5>(),
boost::arg<6>()),
boost::iequals(request_.protocol(), string_type("https")),
always_verify_peer,
timeout_,
Expand Down
2 changes: 1 addition & 1 deletion boost/network/protocol/http/policies/simple_connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ struct simple_connection_policy : resolver_policy<Tag>::type {
lexical_cast<string_type>(request_.port()),
boost::bind(&simple_connection_policy<Tag, version_major,
version_minor>::resolve,
this, _1, _2, _3),
this, boost::arg<1>(), boost::arg<2>(), boost::arg<3>()),
boost::iequals(request_.protocol(), string_type("https")), timeout_,
certificate_filename, verify_path,
certificate_file, private_key_file));
Expand Down
32 changes: 16 additions & 16 deletions boost/network/protocol/http/server/async_connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#ifndef BOOST_NETWORK_HTTP_SERVER_CONNECTION_HEADER_BUFFER_MAX_SIZE
/** Here we define a page's worth of header connection buffer data.
* This can be tuned to reduce the memory cost of connections, but this
* This can be tuned to reduce the memory cost of connections, but this
* default size is set to be friendly to typical service applications.
* This is the maximum size though and Boost.Asio's internal representation
* of a streambuf would make appropriate decisions on how big a buffer
Expand Down Expand Up @@ -91,7 +91,7 @@ namespace boost { namespace network { namespace http {

private:
static char const * status_message(status_t status) {
static char const
static char const
ok_[] = "OK"
, created_[] = "Created"
, accepted_[] = "Accepted"
Expand Down Expand Up @@ -172,9 +172,9 @@ namespace boost { namespace network { namespace http {

/** Function: template <class Range> set_headers(Range headers)
* Precondition: headers have not been sent yet
* Postcondition: headers have been linearized to a buffer,
* Postcondition: headers have been linearized to a buffer,
* and assumed to have been sent already when the function exits
* Throws: std::logic_error in case the headers have already been sent.
* Throws: std::logic_error in case the headers have already been sent.
*
* A call to set_headers takes a Range where each element models the
* Header concept. This Range will be linearized onto a buffer, which is
Expand All @@ -183,7 +183,7 @@ namespace boost { namespace network { namespace http {
template <class Range>
void set_headers(Range headers) {
lock_guard lock(headers_mutex);
if (headers_in_progress || headers_already_sent)
if (headers_in_progress || headers_already_sent)
boost::throw_exception(std::logic_error("Headers have already been sent."));

if (error_encountered)
Expand All @@ -199,7 +199,7 @@ namespace boost { namespace network { namespace http {
if (!boost::empty(headers)) {
typedef typename Range::const_iterator iterator;
typedef typename string<Tag>::type string_type;
boost::transform(headers,
boost::transform(headers,
std::ostream_iterator<string_type>(stream),
linearize_header<Tag>());
} else {
Expand Down Expand Up @@ -228,11 +228,11 @@ namespace boost { namespace network { namespace http {
lock_guard lock(headers_mutex);
if (error_encountered) boost::throw_exception(boost::system::system_error(*error_encountered));

boost::function<void(boost::system::error_code)> f =
boost::function<void(boost::system::error_code)> f =
boost::bind(
&async_connection<Tag,Handler>::default_error
, async_connection<Tag,Handler>::shared_from_this()
, _1);
, boost::arg<1>());

write_impl(
boost::make_iterator_range(range)
Expand Down Expand Up @@ -390,7 +390,7 @@ namespace boost { namespace network { namespace http {
new_start, data_end);
fusion::tie(parsed_ok, result_range) = parser.parse_until(
request_parser_type::method_done, input_range);
if (!parsed_ok) {
if (!parsed_ok) {
client_error();
break;
} else if (parsed_ok == true) {
Expand Down Expand Up @@ -497,7 +497,7 @@ namespace boost { namespace network { namespace http {
}

void client_error() {
static char const * bad_request =
static char const * bad_request =
"HTTP/1.0 400 Bad Request\r\nConnection: close\r\nContent-Type: text/plain\r\nContent-Length: 12\r\n\r\nBad Request.";

asio::async_write(
Expand Down Expand Up @@ -583,17 +583,17 @@ namespace boost { namespace network { namespace http {

static std::size_t const connection_buffer_size =
BOOST_NETWORK_HTTP_SERVER_CONNECTION_BUFFER_SIZE;
shared_array_list temporaries =
shared_array_list temporaries =
boost::make_shared<array_list>();
shared_buffers buffers =
shared_buffers buffers =
boost::make_shared<std::vector<asio::const_buffer> >(0);

std::size_t range_size = boost::distance(range);
buffers->reserve(
(range_size / connection_buffer_size)
+ ((range_size % connection_buffer_size)?1:0)
);
std::size_t slice_size =
std::size_t slice_size =
std::min(range_size,connection_buffer_size);
typename boost::range_iterator<Range>::type
start = boost::begin(range)
Expand Down Expand Up @@ -667,11 +667,11 @@ namespace boost { namespace network { namespace http {
}
}
};

} /* http */

} /* network */

} /* boost */

#endif /* BOOST_NETWORK_PROTOCOL_HTTP_SERVER_CONNECTION_HPP_20101027 */
Expand Down