forked from boostorg/beast
Use core string_view
fix #2417 This improves inter-conversion between string_view implementations. Some observable differences for users: - core::string_view no longer supports the .to_string() or .clear() extensions from Utility - code that relied on .max_size() returning .size(), needs to be fixed to .size() instead - remove_suffix() and remove_prefix() were more lenient than the standard specs; be sure you don't rely on it clamping the argument to valid range - BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS no longer suppresses conversions to std::string - core::string_view adds .contains() and various bugs fixed
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
#if defined(BOOST_BEAST_USE_STD_STRING_VIEW)
|
||||
#include <string_view>
|
||||
#else
|
||||
#include <boost/utility/string_view.hpp>
|
||||
#include <boost/core/detail/string_view.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
@@ -23,7 +23,7 @@ namespace beast {
|
||||
|
||||
#if BOOST_BEAST_DOXYGEN || ! defined(BOOST_BEAST_USE_STD_STRING_VIEW)
|
||||
/// The type of string view used by the library
|
||||
using string_view = boost::string_view;
|
||||
using string_view = boost::core::string_view;
|
||||
|
||||
/// The type of `basic_string_view` used by the library
|
||||
template<class CharT, class Traits>
|
||||
|
||||
Reference in New Issue
Block a user