mirror of https://github.com/Icinga/icinga2.git
Handle boost::beast::http::basic_fields#set() signature change (v1.81)
Make String convertible to boost::beast::string_view (always working), not boost::string_view (broken).
This commit is contained in:
parent
f59f361f09
commit
5bcbc96e22
|
@ -128,15 +128,15 @@ String::operator const std::string&() const
|
|||
}
|
||||
|
||||
/**
|
||||
* Conversion function to boost::string_view.
|
||||
* Conversion function to boost::beast::string_view.
|
||||
*
|
||||
* This allows using String as the value for HTTP headers in boost::beast::http::basic_fields::set.
|
||||
*
|
||||
* @return A boost::string_view representing this string.
|
||||
* @return A boost::beast::string_view representing this string.
|
||||
*/
|
||||
String::operator boost::string_view() const
|
||||
String::operator boost::beast::string_view() const
|
||||
{
|
||||
return boost::string_view(m_Data);
|
||||
return boost::beast::string_view(m_Data);
|
||||
}
|
||||
|
||||
const char *String::CStr() const
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "base/i2-base.hpp"
|
||||
#include "base/object.hpp"
|
||||
#include <boost/beast/core.hpp>
|
||||
#include <boost/range/iterator.hpp>
|
||||
#include <boost/utility/string_view.hpp>
|
||||
#include <functional>
|
||||
|
@ -73,7 +74,7 @@ public:
|
|||
bool operator<(const String& rhs) const;
|
||||
|
||||
operator const std::string&() const;
|
||||
operator boost::string_view() const;
|
||||
operator boost::beast::string_view() const;
|
||||
|
||||
const char *CStr() const;
|
||||
|
||||
|
|
Loading…
Reference in New Issue