Skip to content

Commit 4eac17e

Browse files
committed
cv-qualifier should be removed before checking the Header concept
C++11 allows this kind of construction: connection->set_status(Connection::bad_request); const auto size_to_send = std::to_string(reason.size()); auto headers = { Header{"Content-Length", size_to_send} }; auto range = boost::make_iterator_range(headers); connection->set_headers(range); connection->write(reason); But in the case of an initializer_list, elements are const, then the actual type tested is "const ValueType" instead of "ValueType".
1 parent c6464a0 commit 4eac17e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace boost { namespace network { namespace http {
3535

3636
template <class ValueType>
3737
BOOST_CONCEPT_REQUIRES(
38-
((Header<ValueType>)),
38+
((Header<typename boost::remove_cv<ValueType>::type>)),
3939
(string_type)
4040
) operator()(ValueType & header) {
4141
typedef typename ostringstream<Tag>::type output_stream;

0 commit comments

Comments
 (0)