3#include <xrpl/beast/utility/instrumentation.h>
5#include <boost/core/detail/string_view.hpp>
21template <
class Out,
class In>
30 template <
class Arithmetic = In>
38 template <
class Enumeration = In>
48template <
typename Out>
55 template <
class Integral = Out>
59 auto first = in.data();
60 auto last = in.data() + in.size();
62 if (first != last && *first ==
'+')
67 return ret.ec ==
std::errc() && ret.ptr == last;
77 return std::tolower(static_cast<unsigned char>(c));
80 if (result ==
"1" || result ==
"true")
86 if (result ==
"0" || result ==
"false")
108 operator()(Out& out, boost::core::basic_string_view<char> in)
const
136 XRPL_ASSERT(in,
"beast::detail::LexicalCast(char const*) : non-null input");
151 XRPL_ASSERT(in,
"beast::detail::LexicalCast(char*) : non-null input");
171template <
class Out,
class In>
184template <
class Out,
class In>
199template <
class Out,
class In>
T back_inserter(T... args)
Out lexicalCastThrow(In in)
Convert from one type to another, throw on error.
Out lexicalCast(In in, Out defaultValue=Out())
Convert from one type to another.
bool lexicalCastChecked(Out &out, In in)
Intelligently convert from one type to another.
Thrown when a conversion is not possible with LexicalCast.
bool operator()(Out &out, boost::core::basic_string_view< char > in) const
bool operator()(Out &out, char *in) const
bool operator()(Out &out, char const *in) const
bool operator()(Out &out, std::string in) const
std::enable_if_t< std::is_integral_v< Integral > &&!std::is_same_v< Integral, bool >, bool > operator()(Integral &out, std::string_view in) const
bool operator()(bool &out, std::string_view in) const
std::enable_if_t< std::is_arithmetic_v< Arithmetic >, bool > operator()(std::string &out, Arithmetic in)
std::enable_if_t< std::is_enum_v< Enumeration >, bool > operator()(std::string &out, Enumeration in)