Skip to content

Commit b7dc852

Browse files
committed
Concept-Checking Related Fixes
So upon building in debug mode, I've discovered that some new concepts and checks are failing. These have now been fixed and addressed appropriately.
1 parent f1deeda commit b7dc852

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

boost/network/protocol/http/algorithms/linearize.hpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,21 @@
1414

1515
namespace boost { namespace network { namespace http {
1616

17-
template <class Tag, class ValueType>
17+
template <class Tag>
1818
struct linearize {
1919
typedef typename string<Tag>::type string_type;
2020

2121
template <class Arguments>
22-
struct result {
22+
struct result;
23+
24+
template <class This, class Arg>
25+
struct result<This(Arg)> {
2326
typedef string_type type;
2427
};
2528

29+
template <class ValueType>
2630
BOOST_CONCEPT_REQUIRES(
27-
(Header<ValueType),
31+
((Header<ValueType>)),
2832
(string_type)
2933
) operator()(ValueType & header) {
3034
typedef typename ostringstream<Tag>::type output_stream;

boost/network/protocol/http/header.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ namespace boost { namespace network { namespace http {
2323
template <class Tag>
2424
struct request_header
2525
{
26+
typedef Tag tag;
2627
typedef typename string<Tag>::type string_type;
2728
string_type name, value;
2829
};

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,10 @@ namespace boost { namespace network { namespace http {
161161
std::ostream stream(&headers_buffer);
162162
if (!boost::empty(headers)) {
163163
typedef typename Range::const_iterator iterator;
164-
typedef typename Range::value_type value_type;
165164
typedef typename string<Tag>::type string_type;
166165
boost::transform(headers,
167166
std::ostream_iterator<string_type>(stream),
168-
linearize<Tag, value_type>());
167+
linearize<Tag>());
169168
} else {
170169
stream << consts::crlf();
171170
}

boost/network/protocol/http/server/header.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ namespace boost { namespace network { namespace http {
1616

1717
template <class Tag>
1818
struct response_header {
19+
typedef Tag tag;
1920
typedef typename string<Tag>::type string_type;
2021
string_type name, value;
2122
};

0 commit comments

Comments
 (0)