mirror of
https://github.com/boostorg/beast.git
synced 2025-07-30 21:07:26 +02:00
@ -1,3 +1,4 @@
|
||||
* Fix standalone compilation error with std::string_view
|
||||
* OpenSSL 1.0.2 or later is required
|
||||
* Fix c++20 deprecation warning in span_body
|
||||
|
||||
|
@ -396,12 +396,9 @@ field
|
||||
string_to_field(string_view s);
|
||||
|
||||
/// Write the text for a field name to an output stream.
|
||||
inline
|
||||
BOOST_BEAST_DECL
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, field f)
|
||||
{
|
||||
return os << to_string(f);
|
||||
}
|
||||
operator<<(std::ostream& os, field f);
|
||||
|
||||
} // http
|
||||
} // beast
|
||||
|
@ -11,10 +11,12 @@
|
||||
#define BOOST_BEAST_HTTP_IMPL_FIELD_IPP
|
||||
|
||||
#include <boost/beast/http/field.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstring>
|
||||
#include <boost/assert.hpp>
|
||||
#include <ostream>
|
||||
|
||||
|
||||
namespace boost {
|
||||
namespace beast {
|
||||
@ -565,6 +567,12 @@ string_to_field(string_view s)
|
||||
return detail::get_field_table().string_to_field(s);
|
||||
}
|
||||
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, field f)
|
||||
{
|
||||
return os << to_string(f);
|
||||
}
|
||||
|
||||
} // http
|
||||
} // beast
|
||||
} // boost
|
||||
|
@ -26,6 +26,7 @@ add_executable (tests-beast-http
|
||||
empty_body.cpp
|
||||
error.cpp
|
||||
field.cpp
|
||||
field_compiles.cpp
|
||||
fields.cpp
|
||||
file_body.cpp
|
||||
message.cpp
|
||||
|
@ -16,6 +16,7 @@ local SOURCES =
|
||||
dynamic_body.cpp
|
||||
error.cpp
|
||||
field.cpp
|
||||
field_compiles.cpp
|
||||
fields.cpp
|
||||
file_body.cpp
|
||||
message.cpp
|
||||
|
11
test/beast/http/field_compiles.cpp
Normal file
11
test/beast/http/field_compiles.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
//
|
||||
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Official repository: https://github.com/boostorg/beast
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <boost/beast/http/field.hpp>
|
Reference in New Issue
Block a user