diff --git a/include/xrpl/beast/rfc2616.h b/include/xrpl/beast/rfc2616.h index 922e4a7dc4..15f6d38775 100644 --- a/include/xrpl/beast/rfc2616.h +++ b/include/xrpl/beast/rfc2616.h @@ -11,6 +11,7 @@ #include #include #include +#include #include namespace beast { @@ -179,7 +180,7 @@ split_commas(FwdIt first, FwdIt last) template > Result -split_commas(boost::beast::string_view const& s) +split_commas(std::string_view const& s) { return split_commas(s.begin(), s.end()); } diff --git a/include/xrpl/json/Output.h b/include/xrpl/json/Output.h index db990ab364..bb8ba402ee 100644 --- a/include/xrpl/json/Output.h +++ b/include/xrpl/json/Output.h @@ -5,17 +5,18 @@ #include #include +#include namespace Json { class Value; -using Output = std::function; +using Output = std::function; inline Output stringOutput(std::string& s) { - return [&](boost::beast::string_view const& b) { s.append(b.data(), b.size()); }; + return [&](std::string_view const& b) { s.append(b.data(), b.size()); }; } /** Writes a minimal representation of a Json value to an Output in O(n) time. diff --git a/include/xrpl/server/detail/BaseWSPeer.h b/include/xrpl/server/detail/BaseWSPeer.h index 435930e476..f9c991c6b8 100644 --- a/include/xrpl/server/detail/BaseWSPeer.h +++ b/include/xrpl/server/detail/BaseWSPeer.h @@ -18,6 +18,7 @@ #include #include +#include namespace xrpl { @@ -49,7 +50,7 @@ private: bool ping_active_ = false; boost::beast::websocket::ping_data payload_; error_code ec_; - std::function control_callback_; + std::function control_callback_; public: template @@ -137,7 +138,7 @@ protected: on_ping(error_code const& ec); void - on_ping_pong(boost::beast::websocket::frame_type kind, boost::beast::string_view payload); + on_ping_pong(boost::beast::websocket::frame_type kind, std::string_view payload); void on_timer(error_code ec); @@ -390,11 +391,11 @@ BaseWSPeer::on_ping(error_code const& ec) template void -BaseWSPeer::on_ping_pong(boost::beast::websocket::frame_type kind, boost::beast::string_view payload) +BaseWSPeer::on_ping_pong(boost::beast::websocket::frame_type kind, std::string_view payload) { if (kind == boost::beast::websocket::frame_type::pong) { - boost::beast::string_view p(payload_.begin()); + std::string_view p(payload_.begin()); if (payload == p) { close_on_timer_ = false; diff --git a/src/libxrpl/json/Writer.cpp b/src/libxrpl/json/Writer.cpp index be9595b088..4755af4321 100644 --- a/src/libxrpl/json/Writer.cpp +++ b/src/libxrpl/json/Writer.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -87,14 +88,14 @@ public: } void - output(boost::beast::string_view const& bytes) + output(std::string_view const& bytes) { markStarted(); output_(bytes); } void - stringOutput(boost::beast::string_view const& bytes) + stringOutput(std::string_view const& bytes) { markStarted(); std::size_t position = 0, writtenUntil = 0; diff --git a/src/xrpld/overlay/detail/ProtocolVersion.cpp b/src/xrpld/overlay/detail/ProtocolVersion.cpp index 66926afe24..de99cb2f1c 100644 --- a/src/xrpld/overlay/detail/ProtocolVersion.cpp +++ b/src/xrpld/overlay/detail/ProtocolVersion.cpp @@ -58,7 +58,7 @@ to_string(ProtocolVersion const& p) } std::vector -parseProtocolVersions(boost::beast::string_view const& value) +parseProtocolVersions(std::string_view const& value) { static boost::regex re( "^" // start of line @@ -127,7 +127,7 @@ negotiateProtocolVersion(std::vector const& versions) } std::optional -negotiateProtocolVersion(boost::beast::string_view const& versions) +negotiateProtocolVersion(std::string_view const& versions) { auto const them = parseProtocolVersions(versions); diff --git a/src/xrpld/overlay/detail/ProtocolVersion.h b/src/xrpld/overlay/detail/ProtocolVersion.h index 9499cd1c1b..bc70d70e35 100644 --- a/src/xrpld/overlay/detail/ProtocolVersion.h +++ b/src/xrpld/overlay/detail/ProtocolVersion.h @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -40,7 +41,7 @@ to_string(ProtocolVersion const& p); no duplicates and will be sorted in ascending protocol order. */ std::vector -parseProtocolVersions(boost::beast::string_view const& s); +parseProtocolVersions(std::string_view const& s); /** Given a list of supported protocol versions, choose the one we prefer. */ std::optional @@ -48,7 +49,7 @@ negotiateProtocolVersion(std::vector const& versions); /** Given a list of supported protocol versions, choose the one we prefer. */ std::optional -negotiateProtocolVersion(boost::beast::string_view const& versions); +negotiateProtocolVersion(std::string_view const& versions); /** The list of all the protocol versions we support. */ std::string const& diff --git a/src/xrpld/rpc/detail/ServerHandler.cpp b/src/xrpld/rpc/detail/ServerHandler.cpp index d40965ec79..658ea0dfec 100644 --- a/src/xrpld/rpc/detail/ServerHandler.cpp +++ b/src/xrpld/rpc/detail/ServerHandler.cpp @@ -34,6 +34,7 @@ #include #include #include +#include namespace xrpl { @@ -227,7 +228,7 @@ ServerHandler::onHandoff( static inline Json::Output makeOutput(Session& session) { - return [&](boost::beast::string_view const& b) { session.write(b.data(), b.size()); }; + return [&](std::string_view const& b) { session.write(b.data(), b.size()); }; } static std::map @@ -515,7 +516,7 @@ ServerHandler::processSession(std::shared_ptr const& session, std::shar auto const iter = session->request().find("X-User"); if (iter != session->request().end()) return iter->value(); - return boost::beast::string_view{}; + return std::string_view{}; }()); if (beast::rfc2616::is_keep_alive(session->request()))