35#include <system_error>
62template <
size_t Bits,
typename Signed>
class wide_integer;
64template <
size_t Bits,
typename Signed,
size_t Bits2,
typename Signed2>
65struct common_type<wide_integer<Bits, Signed>, wide_integer<Bits2, Signed2>>;
67template <
size_t Bits,
typename Signed,
typename Arithmetic>
struct common_type<wide_integer<Bits, Signed>, Arithmetic>;
69template <
typename Arithmetic,
size_t Bits,
typename Signed>
struct common_type<Arithmetic, wide_integer<Bits, Signed>>;
83 template <
size_t Bits2,
typename Signed2>
92 template <
typename Arithmetic>
95 template <
typename Arithmetic>
106 template <typename T2, typename = std::enable_if<std::is_integral<T2>::value && std::is_unsigned<T2>::value>>
108 template <typename T2, typename = std::enable_if<std::is_integral<T2>::value && std::is_unsigned<T2>::value>>
112 constexpr
wide_integer<Bits, Signed> operator++(
int) noexcept(is_same<Signed,
unsigned>::
value);
114 constexpr
wide_integer<Bits, Signed> operator--(
int) noexcept(is_same<Signed,
unsigned>::
value);
118 constexpr explicit operator
bool() const noexcept;
125 constexpr operator
long double() const noexcept;
126 constexpr operator
double() const noexcept;
127 constexpr operator
float() const noexcept;
136 friend class numeric_limits<
wide_integer<Bits, signed>>;
137 friend class numeric_limits<
wide_integer<Bits, unsigned>>;
143template <class T1, class T2>
147template <class T, class T2>
151template <
size_t Bits, typename Signed>
154template <
size_t Bits, typename Signed>
158template <
size_t Bits, typename Signed>
163template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
166template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
167std::common_type_t<Arithmetic, Arithmetic2> constexpr operator*(const Arithmetic &
rhs, const Arithmetic2 &lhs);
169template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
172template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
173std::common_type_t<Arithmetic, Arithmetic2> constexpr operator/(const Arithmetic &
rhs, const Arithmetic2 &lhs);
175template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
178template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
179std::common_type_t<Arithmetic, Arithmetic2> constexpr operator+(const Arithmetic &
rhs, const Arithmetic2 &lhs);
181template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
184template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
185std::common_type_t<Arithmetic, Arithmetic2> constexpr operator-(const Arithmetic &
rhs, const Arithmetic2 &lhs);
187template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
190template <typename Integral, typename Integral2, class =
__only_integer<Integral, Integral2>>
191std::common_type_t<Integral, Integral2> constexpr operator%(const Integral &
rhs, const Integral2 &lhs);
193template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
196template <typename Integral, typename Integral2, class =
__only_integer<Integral, Integral2>>
197std::common_type_t<Integral, Integral2> constexpr operator&(const Integral &
rhs, const Integral2 &lhs);
199template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
202template <typename Integral, typename Integral2, class =
__only_integer<Integral, Integral2>>
203std::common_type_t<Integral, Integral2> constexpr operator|(const Integral &
rhs, const Integral2 &lhs);
205template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
208template <typename Integral, typename Integral2, class =
__only_integer<Integral, Integral2>>
209std::common_type_t<Integral, Integral2> constexpr operator^(const Integral &
rhs, const Integral2 &lhs);
212template <
size_t Bits, typename Signed, typename T2,
216template <
size_t Bits, typename Signed, typename T2,
220template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
222template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
223constexpr
bool operator<(const Arithmetic &
rhs, const Arithmetic2 &lhs);
225template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
227template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
228constexpr
bool operator>(const Arithmetic &
rhs, const Arithmetic2 &lhs);
230template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
232template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
233constexpr
bool operator<=(const Arithmetic &
rhs, const Arithmetic2 &lhs);
235template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
237template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
238constexpr
bool operator>=(const Arithmetic &
rhs, const Arithmetic2 &lhs);
240template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
242template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
243constexpr
bool operator==(const Arithmetic &
rhs, const Arithmetic2 &lhs);
245template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
247template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
248constexpr
bool operator!=(const Arithmetic &
rhs, const Arithmetic2 &lhs);
254template <
size_t Bits, typename Signed>
257template <
size_t Bits, typename Signed>
260template <
size_t Bits, typename Signed>
std::istream &operator>>(
std::istream &in,
wide_integer<Bits, Signed> &
n);
262template <
size_t Bits, typename Signed>
std::wistream &operator>>(
std::wistream &in,
wide_integer<Bits, Signed> &
n);
264inline namespace literals {
265inline namespace wide_integer_literals {
290template <
size_t Bits,
typename Signed>
class numeric_limits<
wide_integer<Bits, Signed>>;
292template <
size_t Bits,
typename Signed>
struct hash<
wide_integer<Bits, Signed>>;
const std::vector< double > & rhs
double value
The value of the point.
constexpr wide_integer< Bits, Signed > & operator>>=(T2 n) noexcept
const base_type * ptr() const
constexpr wide_integer< Bits, Signed > & operator<<=(T2 n) noexcept
constexpr wide_integer< Bits, Signed > & operator++() noexcept(is_same< Signed, unsigned >::value)
constexpr wide_integer< Bits, Signed > & operator&=(const Integral &rhs) noexcept
base_type m_arr[_impl::arr_size]
constexpr wide_integer(const wide_integer< Bits2, Signed2 > &rhs) noexcept
constexpr wide_integer< Bits, Signed > & operator*=(const Arithmetic &rhs)
constexpr wide_integer< Bits, Signed > & operator|=(const Integral &rhs) noexcept
constexpr wide_integer< Bits, Signed > & operator=(const wide_integer< Bits2, Signed2 > &rhs) noexcept
constexpr wide_integer(T rhs) noexcept
typename std::enable_if< std::is_arithmetic< T >::value, T >::type __integral_not_wide_integer_class
constexpr wide_integer< Bits, Signed > & operator+=(const Arithmetic &rhs) noexcept(is_same< Signed, unsigned >::value)
constexpr wide_integer< Bits, Signed > & operator=(Arithmetic rhs) noexcept
constexpr wide_integer< Bits, Signed > & operator-=(const Arithmetic &rhs) noexcept(is_same< Signed, unsigned >::value)
constexpr wide_integer< Bits, Signed > & operator%=(const Integral &rhs)
constexpr wide_integer< Bits, Signed > & operator^=(const Integral &rhs) noexcept
constexpr wide_integer< Bits, Signed > & operator/=(const Arithmetic &rhs)
wide_integer< Bits, signed > wide_int
wide_integer< Bits, unsigned > wide_uint
wide_uint< 512 > uint512_t
wide_uint< 256 > uint256_t
wide_uint< 128 > uint128_t
typename std::enable_if< IntegralConcept< T >() &&IntegralConcept< T2 >()>::type __only_integer
typename std::enable_if< ArithmeticConcept< T1 >() &&ArithmeticConcept< T2 >()>::type __only_arithmetic
static constexpr bool ArithmeticConcept() noexcept
static constexpr bool IntegralConcept() noexcept
std::wstring to_wstring(const wide_integer< Bits, Signed > &n)
std::string to_string(const wide_integer< Bits, Signed > &n)