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

Commitaf55a2f

Browse files
committed
Replaced boost::tuple and boost::fusion::tuple with std::tuple.
1 parent7d72d18 commitaf55a2f

File tree

14 files changed

+76
-83
lines changed

14 files changed

+76
-83
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ struct http_async_connection
305305
// the buffer. We need this in the body processing to make sure that
306306
// the data remaining in the buffer is dealt with before another call
307307
// to get more data for the body is scheduled.
308-
fusion::tie(parsed_ok, remainder) =this->parse_headers(
308+
std::tie(parsed_ok, remainder) =this->parse_headers(
309309
delegate_,
310310
request_strand_.wrap([=] (boost::system::error_codeconst &ec,
311311
std::size_t bytes_transferred) {

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

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#include<iterator>
1212
#include<cstdint>
1313
#include<array>
14-
#include<boost/fusion/tuple/tuple.hpp>
15-
#include<boost/fusion/tuple/tuple_tie.hpp>
1614
#include<boost/logic/tribool.hpp>
1715
#include<boost/network/detail/debug.hpp>
1816
#include<boost/network/protocol/http/algorithms/linearize.hpp>
@@ -110,7 +108,7 @@ struct http_async_protocol_handler {
110108
typename boost::iterator_range<typename buffer_type::const_iterator>
111109
result_range,
112110
input_range =boost::make_iterator_range(part_begin, part_end);
113-
fusion::tie(parsed_ok, result_range) = response_parser_.parse_until(
111+
std::tie(parsed_ok, result_range) = response_parser_.parse_until(
114112
response_parser_type::http_version_done, input_range);
115113
if (parsed_ok ==true) {
116114
string_type version;
@@ -156,7 +154,7 @@ struct http_async_protocol_handler {
156154
typename boost::iterator_range<typename buffer_type::const_iterator>
157155
result_range,
158156
input_range =boost::make_iterator_range(part_begin, part_end);
159-
fusion::tie(parsed_ok, result_range) = response_parser_.parse_until(
157+
std::tie(parsed_ok, result_range) = response_parser_.parse_until(
160158
response_parser_type::http_status_done, input_range);
161159
if (parsed_ok ==true) {
162160
string_type status;
@@ -202,7 +200,7 @@ struct http_async_protocol_handler {
202200
typename boost::iterator_range<typename buffer_type::const_iterator>
203201
result_range,
204202
input_range =boost::make_iterator_range(part_begin, part_end);
205-
fusion::tie(parsed_ok, result_range) = response_parser_.parse_until(
203+
std::tie(parsed_ok, result_range) = response_parser_.parse_until(
206204
response_parser_type::http_status_message_done, input_range);
207205
if (parsed_ok ==true) {
208206
string_type status_message;
@@ -248,14 +246,14 @@ struct http_async_protocol_handler {
248246
typename headers_container<Tag>::type headers;
249247
std::pair<string_type, string_type> header_pair;
250248
while (!boost::empty(input_range)) {
251-
fusion::tie(parsed_ok, result_range) = headers_parser.parse_until(
249+
std::tie(parsed_ok, result_range) = headers_parser.parse_until(
252250
response_parser_type::http_header_colon, input_range);
253251
if (headers_parser.state() != response_parser_type::http_header_colon)
254252
break;
255253
header_pair.first =
256254
string_type(std::begin(result_range),std::end(result_range));
257255
input_range.advance_begin(boost::distance(result_range));
258-
fusion::tie(parsed_ok, result_range) = headers_parser.parse_until(
256+
std::tie(parsed_ok, result_range) = headers_parser.parse_until(
259257
response_parser_type::http_header_line_done, input_range);
260258
header_pair.second =
261259
string_type(std::begin(result_range),std::end(result_range));
@@ -279,16 +277,16 @@ struct http_async_protocol_handler {
279277
}
280278

281279
template<classDelegate,classCallback>
282-
fusion::tuple<logic::tribool,size_t>parse_headers(Delegate& delegate_,
283-
Callback callback,
284-
size_t bytes) {
280+
std::tuple<logic::tribool,size_t>parse_headers(Delegate& delegate_,
281+
Callback callback,
282+
size_t bytes) {
285283
logic::tribool parsed_ok;
286284
typename buffer_type::const_iterator part_end = part.begin();
287285
std::advance(part_end, bytes);
288286
typename boost::iterator_range<typename buffer_type::const_iterator>
289287
result_range,
290288
input_range =boost::make_iterator_range(part_begin, part_end);
291-
fusion::tie(parsed_ok, result_range) = response_parser_.parse_until(
289+
std::tie(parsed_ok, result_range) = response_parser_.parse_until(
292290
response_parser_type::http_headers_done, input_range);
293291
if (parsed_ok ==true) {
294292
string_type headers_string;
@@ -322,7 +320,7 @@ struct http_async_protocol_handler {
322320
boost::asio::mutable_buffers_1(part.data(), part.size()),
323321
callback);
324322
}
325-
returnfusion::make_tuple(
323+
returnstd::make_tuple(
326324
parsed_ok,std::distance(std::end(result_range), part_end));
327325
}
328326

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include<boost/asio/write.hpp>
1717
#include<boost/asio/read_until.hpp>
1818
#include<boost/network/protocol/http/response.hpp>
19-
#include<boost/tuple/tuple.hpp>
2019

2120
#include<boost/network/protocol/http/client/connection/sync_normal.hpp>
2221
#ifdef BOOST_NETWORK_ENABLE_HTTPS

‎boost/network/protocol/http/parser/incremental.hpp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
// http://www.boost.org/LICENSE_1_0.txt)
1010

1111
#include<iterator>
12+
#include<tuple>
1213
#include<boost/algorithm/string/classification.hpp>
13-
#include<boost/fusion/tuple.hpp>
1414
#include<boost/logic/tribool.hpp>
1515
#include<boost/network/tags.hpp>
1616
#include<boost/network/traits/string.hpp>
@@ -64,7 +64,7 @@ struct response_parser {
6464
}
6565

6666
template<classRange>
67-
fusion::tuple<logic::tribool, iterator_range<typename Range::const_iterator> >
67+
std::tuple<logic::tribool, iterator_range<typename Range::const_iterator> >
6868
parse_until(state_t stop_state, Range& range_) {
6969
logic::triboolparsed_ok(logic::indeterminate);
7070
typename Range::const_iterator start =std::begin(range_),
@@ -293,8 +293,8 @@ struct response_parser {
293293
}
294294
if (state_ == stop_state) { parsed_ok =true;
295295
}
296-
returnfusion::make_tuple(parsed_ok,
297-
boost::make_iterator_range(start, current));
296+
returnstd::make_tuple(parsed_ok,
297+
boost::make_iterator_range(start, current));
298298
}
299299

300300
state_tstate() {return state_; }

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include<boost/network/protocol/http/message/wrappers/protocol.hpp>
1717
#include<boost/network/protocol/http/traits/resolver_policy.hpp>
1818
#include<boost/network/version.hpp>
19-
#include<boost/tuple/tuple.hpp>
2019

2120
namespaceboost {
2221
namespacenetwork {

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include<boost/network/protocol/http/traits/resolver.hpp>
1616
#include<boost/network/traits/string.hpp>
1717
#include<boost/algorithm/string/case_conv.hpp>
18-
#include<boost/fusion/tuple/tuple_tie.hpp>
1918

2019
namespaceboost {
2120
namespacenetwork {
@@ -78,7 +77,7 @@ struct async_resolver : std::enable_shared_from_this<async_resolver<Tag> > {
7877
typename endpoint_cache::iterator iter;
7978
bool inserted =false;
8079
if (!ec && cache_resolved_) {
81-
boost::fusion::tie(iter, inserted) =
80+
std::tie(iter, inserted) =
8281
endpoint_cache_.insert(std::make_pair(
8382
host,std::make_pair(endpoint_iterator,resolver_iterator())));
8483
once_resolved(ec, iter->second);

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include<boost/network/protocol/http/client/connection/sync_base.hpp>
2020
#include<boost/network/traits/string.hpp>
2121
#include<boost/optional/optional.hpp>
22-
#include<boost/tuple/tuple.hpp>
2322

2423
namespaceboost {
2524
namespacenetwork {

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
// http://www.boost.org/LICENSE_1_0.txt)
88

99
#include<unordered_map>
10-
#include<boost/network/protocol/http/traits/resolver.hpp>
1110
#include<utility>
12-
#include<boost/fusion/adapted/std_pair.hpp>
13-
#include<boost/fusion/include/tuple.hpp>
11+
#include<tuple>
1412
#include<boost/algorithm/string/case_conv.hpp>
13+
#include<boost/network/protocol/http/traits/resolver.hpp>
1514
#include<boost/network/traits/string.hpp>
1615

1716
namespaceboost {
@@ -45,7 +44,7 @@ struct sync_resolver {
4544
endpoint_cache_.find(hostname);
4645
if (cached_iterator == endpoint_cache_.end()) {
4746
bool inserted =false;
48-
boost::fusion::tie(cached_iterator, inserted) =
47+
std::tie(cached_iterator, inserted) =
4948
endpoint_cache_.insert(std::make_pair(
5049
boost::to_lower_copy(hostname),
5150
std::make_pair(

‎boost/network/protocol/http/request_parser.hpp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#ifndef HTTP_SERVER3_REQUEST_PARSER_HPP
1616
#defineHTTP_SERVER3_REQUEST_PARSER_HPP
1717

18+
#include<tuple>
1819
#include<boost/logic/tribool.hpp>
19-
#include<boost/tuple/tuple.hpp>
2020
#include<boost/network/protocol/http/request.hpp>
2121

2222
namespaceboost {
@@ -45,14 +45,14 @@ class basic_request_parser {
4545
/// of the
4646
/// input has been consumed.
4747
template<typename InputIterator>
48-
boost::tuple<boost::tribool, InputIterator>parse_headers(
48+
std::tuple<boost::tribool, InputIterator>parse_headers(
4949
basic_request<Tag>& req, InputIterator begin, InputIterator end) {
5050
while (begin != end) {
5151
boost::tribool result =consume(req, *begin++);
52-
if (result || !result)returnboost::make_tuple(result, begin);
52+
if (result || !result)returnstd::make_tuple(result, begin);
5353
}
5454
boost::tribool result = boost::indeterminate;
55-
returnboost::make_tuple(result, begin);
55+
returnstd::make_tuple(result, begin);
5656
}
5757

5858
private:

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include<mutex>
1616
#include<array>
1717
#include<functional>
18+
#include<tuple>
1819
#include<boost/asio/buffer.hpp>
1920
#include<boost/asio/ip/tcp.hpp>
2021
#include<boost/asio/strand.hpp>
@@ -62,7 +63,7 @@ namespace http {
6263

6364
#ifndef BOOST_NETWORK_NO_LIB
6465
externvoidparse_version(std::stringconst& partial_parsed,
65-
fusion::tuple<uint8_t,uint8_t>& version_pair);
66+
std::tuple<std::uint8_t,std::uint8_t>& version_pair);
6667
externvoidparse_headers(std::stringconst& input,
6768
std::vector<request_header_narrow>& container);
6869
#endif
@@ -423,7 +424,7 @@ struct async_connection
423424
switch (state) {
424425
case method:
425426
input_range =boost::make_iterator_range(new_start, data_end);
426-
fusion::tie(parsed_ok, result_range) =
427+
std::tie(parsed_ok, result_range) =
427428
parser.parse_until(request_parser_type::method_done, input_range);
428429
if (!parsed_ok) {
429430
client_error();
@@ -443,7 +444,7 @@ struct async_connection
443444
}
444445
case uri:
445446
input_range =boost::make_iterator_range(new_start, data_end);
446-
fusion::tie(parsed_ok, result_range) =
447+
std::tie(parsed_ok, result_range) =
447448
parser.parse_until(request_parser_type::uri_done, input_range);
448449
if (!parsed_ok) {
449450
client_error();
@@ -463,18 +464,18 @@ struct async_connection
463464
}
464465
case version:
465466
input_range =boost::make_iterator_range(new_start, data_end);
466-
fusion::tie(parsed_ok, result_range) = parser.parse_until(
467+
std::tie(parsed_ok, result_range) = parser.parse_until(
467468
request_parser_type::version_done, input_range);
468469
if (!parsed_ok) {
469470
client_error();
470471
break;
471472
}elseif (parsed_ok ==true) {
472-
fusion::tuple<uint8_t,uint8_t> version_pair;
473+
std::tuple<std::uint8_t,std::uint8_t> version_pair;
473474
partial_parsed.append(std::begin(result_range),
474475
std::end(result_range));
475476
parse_version(partial_parsed, version_pair);
476-
request_.http_version_major =fusion::get<0>(version_pair);
477-
request_.http_version_minor =fusion::get<1>(version_pair);
477+
request_.http_version_major =std::get<0>(version_pair);
478+
request_.http_version_minor =std::get<1>(version_pair);
478479
new_start =std::end(result_range);
479480
partial_parsed.clear();
480481
}else {
@@ -486,7 +487,7 @@ struct async_connection
486487
}
487488
case headers:
488489
input_range =boost::make_iterator_range(new_start, data_end);
489-
fusion::tie(parsed_ok, result_range) = parser.parse_until(
490+
std::tie(parsed_ok, result_range) = parser.parse_until(
490491
request_parser_type::headers_done, input_range);
491492
if (!parsed_ok) {
492493
client_error();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp