1#include <xrpld/overlay/detail/ProtocolVersion.h>
3#include <xrpl/beast/core/LexicalCast.h>
4#include <xrpl/beast/rfc2616.h>
6#include <boost/iterator/function_output_iterator.hpp>
7#include <boost/regex.hpp>
32 []()
constexpr ->
bool {
44 for (
auto i = 0; i != len - 1; ++i)
53 "The list of supported protocols isn't properly sorted.");
64 static boost::regex re(
67 "([2-9]|(?:[1-9][0-9]+))"
74 boost::regex_constants::optimize);
82 if (boost::regex_match(s, m, re))
126 boost::make_function_output_iterator(pickVersion));
Result split_commas(FwdIt first, FwdIt last)
bool lexicalCastChecked(Out &out, In in)
Intelligently convert from one type to another.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::optional< ProtocolVersion > negotiateProtocolVersion(std::vector< ProtocolVersion > const &versions)
Given a list of supported protocol versions, choose the one we prefer.
std::vector< ProtocolVersion > parseProtocolVersions(boost::beast::string_view const &value)
Parse a set of protocol versions.
constexpr ProtocolVersion const supportedProtocolList[]
The list of protocol versions we speak and we prefer to use.
constexpr ProtocolVersion make_protocol(std::uint16_t major, std::uint16_t minor)
std::string const & supportedProtocolVersions()
The list of all the protocol versions we support.
std::string to_string(base_uint< Bits, Tag > const &a)
bool isProtocolSupported(ProtocolVersion const &v)
Determine whether we support a specific protocol version.
T set_intersection(T... args)