Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitde660e0

Browse files
committed
Fix compilation errors for projects using BOOST_BIND_NO_PLACEHOLDERS.
1 parent94f20b9 commitde660e0

File tree

7 files changed

+33
-31
lines changed

7 files changed

+33
-31
lines changed

‎boost/network/protocol/http/client/connection/async_normal.hpp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,14 @@ struct http_async_connection
9595
resolve_(resolver_,host(request), port_,
9696
request_strand_.wrap(boost::bind(
9797
&this_type::handle_resolved,this_type::shared_from_this(),
98-
port_, get_body, callback, generator, _1, _2)));
98+
port_, get_body, callback, generator, boost::arg<1>(),
99+
boost::arg<2>())));
99100
if (timeout_ >0) {
100101
timer_.expires_from_now(boost::posix_time::seconds(timeout_));
101102
timer_.async_wait(request_strand_.wrap(
102103
boost::bind(&this_type::handle_timeout,
103104
this_type::shared_from_this(),
104-
_1)));
105+
boost::arg<1>())));
105106
}
106107
return response_;
107108
}

‎boost/network/protocol/http/client/connection/sync_normal.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ struct http_sync_connection
8181
timer_.expires_from_now(boost::posix_time::seconds(timeout_));
8282
timer_.async_wait(boost::bind(&this_type::handle_timeout,
8383
this_type::shared_from_this(),
84-
_1));
84+
boost::arg<1>()));
8585
}
8686
}
8787

‎boost/network/protocol/http/client/connection/sync_ssl.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ struct https_sync_connection
117117
timer_.expires_from_now(boost::posix_time::seconds(timeout_));
118118
timer_.async_wait(boost::bind(&this_type::handle_timeout,
119119
this_type::shared_from_this(),
120-
_1));
120+
boost::arg<1>()));
121121
}
122122
}
123123

‎boost/network/protocol/http/policies/async_connection.hpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ struct async_connection_policy : resolver_policy<Tag>::type {
8080
follow_redirect_, always_verify_peer,
8181
boost::bind(&async_connection_policy<Tag, version_major,
8282
version_minor>::resolve,
83-
this, _1, _2, _3, _4),
83+
this, boost::arg<1>(), boost::arg<2>(),
84+
boost::arg<3>(), boost::arg<4>()),
8485
resolver,boost::iequals(protocol_,string_type("https")), timeout_,
8586
certificate_filename, verify_path,
8687
certificate_file, private_key_file));

‎boost/network/protocol/http/policies/pooled_connection.hpp‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -221,20 +221,20 @@ struct pooled_connection_policy : resolver_policy<Tag>::type {
221221
version_major,
222222
version_minor>::resolve,
223223
this,
224-
_1,
225-
_2,
226-
_3),
224+
boost::arg<1>(),
225+
boost::arg<2>(),
226+
boost::arg<3>()),
227227
boost::bind(&pooled_connection_policy<Tag,
228228
version_major,
229229
version_minor>::get_connection,
230230
this,
231-
_1,
232-
_2,
231+
boost::arg<1>(),
232+
boost::arg<2>(),
233233
always_verify_peer,
234-
_3,
235-
_4,
236-
_5,
237-
_6),
234+
boost::arg<3>(),
235+
boost::arg<4>(),
236+
boost::arg<5>(),
237+
boost::arg<6>()),
238238
boost::iequals(request_.protocol(),string_type("https")),
239239
always_verify_peer,
240240
timeout_,

‎boost/network/protocol/http/policies/simple_connection.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ struct simple_connection_policy : resolver_policy<Tag>::type {
124124
lexical_cast<string_type>(request_.port()),
125125
boost::bind(&simple_connection_policy<Tag, version_major,
126126
version_minor>::resolve,
127-
this,_1, _2, _3),
127+
this,boost::arg<1>(), boost::arg<2>(), boost::arg<3>()),
128128
boost::iequals(request_.protocol(),string_type("https")), timeout_,
129129
certificate_filename, verify_path,
130130
certificate_file, private_key_file));

‎boost/network/protocol/http/server/async_connection.hpp‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

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

9292
private:
9393
staticcharconst *status_message(status_t status) {
94-
staticcharconst
94+
staticcharconst
9595
ok_[] ="OK"
9696
, created_[] ="Created"
9797
, accepted_[] ="Accepted"
@@ -172,9 +172,9 @@ namespace boost { namespace network { namespace http {
172172

173173
/** Function: template <class Range> set_headers(Range headers)
174174
* Precondition: headers have not been sent yet
175-
* Postcondition: headers have been linearized to a buffer,
175+
* Postcondition: headers have been linearized to a buffer,
176176
* and assumed to have been sent already when the function exits
177-
* Throws: std::logic_error in case the headers have already been sent.
177+
* Throws: std::logic_error in case the headers have already been sent.
178178
*
179179
* A call to set_headers takes a Range where each element models the
180180
* Header concept. This Range will be linearized onto a buffer, which is
@@ -183,7 +183,7 @@ namespace boost { namespace network { namespace http {
183183
template<classRange>
184184
voidset_headers(Range headers) {
185185
lock_guardlock(headers_mutex);
186-
if (headers_in_progress || headers_already_sent)
186+
if (headers_in_progress || headers_already_sent)
187187
boost::throw_exception(std::logic_error("Headers have already been sent."));
188188

189189
if (error_encountered)
@@ -199,7 +199,7 @@ namespace boost { namespace network { namespace http {
199199
if (!boost::empty(headers)) {
200200
typedeftypename Range::const_iterator iterator;
201201
typedeftypename string<Tag>::type string_type;
202-
boost::transform(headers,
202+
boost::transform(headers,
203203
std::ostream_iterator<string_type>(stream),
204204
linearize_header<Tag>());
205205
}else {
@@ -228,11 +228,11 @@ namespace boost { namespace network { namespace http {
228228
lock_guardlock(headers_mutex);
229229
if (error_encountered)boost::throw_exception(boost::system::system_error(*error_encountered));
230230

231-
boost::function<void(boost::system::error_code)> f =
231+
boost::function<void(boost::system::error_code)> f =
232232
boost::bind(
233233
&async_connection<Tag,Handler>::default_error
234234
, async_connection<Tag,Handler>::shared_from_this()
235-
,_1);
235+
,boost::arg<1>());
236236

237237
write_impl(
238238
boost::make_iterator_range(range)
@@ -390,7 +390,7 @@ namespace boost { namespace network { namespace http {
390390
new_start, data_end);
391391
fusion::tie(parsed_ok, result_range) = parser.parse_until(
392392
request_parser_type::method_done, input_range);
393-
if (!parsed_ok) {
393+
if (!parsed_ok) {
394394
client_error();
395395
break;
396396
}elseif (parsed_ok ==true) {
@@ -497,7 +497,7 @@ namespace boost { namespace network { namespace http {
497497
}
498498

499499
voidclient_error() {
500-
staticcharconst * bad_request =
500+
staticcharconst * bad_request =
501501
"HTTP/1.0 400 Bad Request\r\nConnection: close\r\nContent-Type: text/plain\r\nContent-Length: 12\r\n\r\nBad Request.";
502502

503503
asio::async_write(
@@ -583,17 +583,17 @@ namespace boost { namespace network { namespace http {
583583

584584
static std::size_tconst connection_buffer_size =
585585
BOOST_NETWORK_HTTP_SERVER_CONNECTION_BUFFER_SIZE;
586-
shared_array_list temporaries =
586+
shared_array_list temporaries =
587587
boost::make_shared<array_list>();
588-
shared_buffers buffers =
588+
shared_buffers buffers =
589589
boost::make_shared<std::vector<asio::const_buffer> >(0);
590590

591591
std::size_t range_size =boost::distance(range);
592592
buffers->reserve(
593593
(range_size / connection_buffer_size)
594594
+ ((range_size % connection_buffer_size)?1:0)
595595
);
596-
std::size_t slice_size =
596+
std::size_t slice_size =
597597
std::min(range_size,connection_buffer_size);
598598
typename boost::range_iterator<Range>::type
599599
start =boost::begin(range)
@@ -667,11 +667,11 @@ namespace boost { namespace network { namespace http {
667667
}
668668
}
669669
};
670-
670+
671671
}/* http*/
672-
672+
673673
}/* network*/
674-
674+
675675
}/* boost*/
676676

677677
#endif/* BOOST_NETWORK_PROTOCOL_HTTP_SERVER_CONNECTION_HPP_20101027*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp