Fix standalone compilation error with std::string_view

fixes #1913
This commit is contained in:
Richard Hodges committed 2020-04-30 21:00:00 +02:00
1 parent e5c48d4f0d
commit fda558e034
6 files changed
+25 -6

No files matched your search

+9 -1
View File
@@ -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