mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 05:34:48 +02:00
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
27d46a4e5a
commit
68198f2ef9
@ -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.
|
* 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
|
const char *String::CStr() const
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include "base/i2-base.hpp"
|
#include "base/i2-base.hpp"
|
||||||
#include "base/object.hpp"
|
#include "base/object.hpp"
|
||||||
|
#include <boost/beast/core.hpp>
|
||||||
#include <boost/range/iterator.hpp>
|
#include <boost/range/iterator.hpp>
|
||||||
#include <boost/utility/string_view.hpp>
|
#include <boost/utility/string_view.hpp>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
@ -73,7 +74,7 @@ public:
|
|||||||
bool operator<(const String& rhs) const;
|
bool operator<(const String& rhs) const;
|
||||||
|
|
||||||
operator const std::string&() const;
|
operator const std::string&() const;
|
||||||
operator boost::string_view() const;
|
operator boost::beast::string_view() const;
|
||||||
|
|
||||||
const char *CStr() const;
|
const char *CStr() const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user