20 #ifndef RIPPLE_PATH_IMPL_AMOUNTSPEC_H_INCLUDED
21 #define RIPPLE_PATH_IMPL_AMOUNTSPEC_H_INCLUDED
23 #include <ripple/basics/IOUAmount.h>
24 #include <ripple/basics/XRPAmount.h>
25 #include <ripple/protocol/STAmount.h>
50 stream <<
"/(" << *amt.
currency <<
")";
52 stream <<
"/" << *amt.
issuer <<
"";
75 #if defined(__GNUC__) && !defined(__clang__)
76 #pragma GCC diagnostic push
78 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
86 #if defined(__GNUC__) && !defined(__clang__)
87 #pragma GCC diagnostic pop
118 static_assert(
sizeof(T) == -1,
"Must used specialized function");
142 static_assert(
sizeof(T) == -1,
"Must used specialized function");
147 inline IOUAmount
const&
155 inline XRPAmount
const&
XRPAmount & get< XRPAmount >(EitherAmount &amt)
EitherAmount toEitherAmount(STAmount const &amt)
std::uint64_t mantissa() const noexcept
friend std::ostream & operator<<(std::ostream &stream, AmountSpec const &amt)
boost::optional< Currency > currency
Floating point representation of amounts with high dynamic range.
std::string to_string(ListDisposition disposition)
IOUAmount & get< IOUAmount >(EitherAmount &amt)
EitherAmount(XRPAmount const &a)
int exponent() const noexcept
AmountSpec toAmountSpec(STAmount const &amt)
EitherAmount(AmountSpec const &a)
bool isXRP(AccountID const &c)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
boost::optional< AccountID > issuer
Issue const & issue() const
EitherAmount(IOUAmount const &a)
friend std::ostream & operator<<(std::ostream &stream, EitherAmount const &amt)
bool negative() const noexcept
T & get(EitherAmount &amt)