34#include <system_error>
61template <
size_t Bits,
typename Signed>
class wide_integer;
63template <
size_t Bits,
typename Signed,
size_t Bits2,
typename Signed2>
64struct common_type<wide_integer<Bits, Signed>, wide_integer<Bits2, Signed2>>;
66template <
size_t Bits,
typename Signed,
typename Arithmetic>
struct common_type<wide_integer<Bits, Signed>, Arithmetic>;
68template <
typename Arithmetic,
size_t Bits,
typename Signed>
struct common_type<Arithmetic, wide_integer<Bits, Signed>>;
82 template <
size_t Bits2,
typename Signed2>
91 template <
typename Arithmetic>
94 template <
typename Arithmetic>
105 template <typename T2, typename = std::enable_if<std::is_integral<T2>::value && std::is_unsigned<T2>::value>>
107 template <typename T2, typename = std::enable_if<std::is_integral<T2>::value && std::is_unsigned<T2>::value>>
111 constexpr
wide_integer<Bits, Signed> operator++(
int) noexcept(is_same<Signed,
unsigned>::
value);
113 constexpr
wide_integer<Bits, Signed> operator--(
int) noexcept(is_same<Signed,
unsigned>::
value);
117 constexpr explicit operator
bool() const noexcept;
124 constexpr operator
long double() const noexcept;
125 constexpr operator
double() const noexcept;
126 constexpr operator
float() const noexcept;
135 friend class numeric_limits<
wide_integer<Bits, signed>>;
136 friend class numeric_limits<
wide_integer<Bits, unsigned>>;
142template <class T1, class T2>
146template <class T, class T2>
150template <
size_t Bits, typename Signed>
153template <
size_t Bits, typename Signed>
157template <
size_t Bits, typename Signed>
162template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
165template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
166std::common_type_t<Arithmetic, Arithmetic2> constexpr operator*(const Arithmetic &
rhs, const Arithmetic2 &lhs);
168template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
171template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
172std::common_type_t<Arithmetic, Arithmetic2> constexpr operator/(const Arithmetic &
rhs, const Arithmetic2 &lhs);
174template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
177template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
178std::common_type_t<Arithmetic, Arithmetic2> constexpr operator+(const Arithmetic &
rhs, const Arithmetic2 &lhs);
180template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
183template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
184std::common_type_t<Arithmetic, Arithmetic2> constexpr operator-(const Arithmetic &
rhs, const Arithmetic2 &lhs);
186template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
189template <typename Integral, typename Integral2, class =
__only_integer<Integral, Integral2>>
190std::common_type_t<Integral, Integral2> constexpr operator%(const Integral &
rhs, const Integral2 &lhs);
192template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
195template <typename Integral, typename Integral2, class =
__only_integer<Integral, Integral2>>
196std::common_type_t<Integral, Integral2> constexpr operator&(const Integral &
rhs, const Integral2 &lhs);
198template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
201template <typename Integral, typename Integral2, class =
__only_integer<Integral, Integral2>>
202std::common_type_t<Integral, Integral2> constexpr operator|(const Integral &
rhs, const Integral2 &lhs);
204template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
207template <typename Integral, typename Integral2, class =
__only_integer<Integral, Integral2>>
208std::common_type_t<Integral, Integral2> constexpr operator^(const Integral &
rhs, const Integral2 &lhs);
211template <
size_t Bits, typename Signed, typename T2,
215template <
size_t Bits, typename Signed, typename T2,
219template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
221template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
222constexpr
bool operator<(const Arithmetic &
rhs, const Arithmetic2 &lhs);
224template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
226template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
227constexpr
bool operator>(const Arithmetic &
rhs, const Arithmetic2 &lhs);
229template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
231template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
232constexpr
bool operator<=(const Arithmetic &
rhs, const Arithmetic2 &lhs);
234template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
236template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
237constexpr
bool operator>=(const Arithmetic &
rhs, const Arithmetic2 &lhs);
239template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
241template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
242constexpr
bool operator==(const Arithmetic &
rhs, const Arithmetic2 &lhs);
244template <
size_t Bits, typename Signed,
size_t Bits2, typename Signed2>
246template <typename Arithmetic, typename Arithmetic2, class =
__only_arithmetic<Arithmetic, Arithmetic2>>
247constexpr
bool operator!=(const Arithmetic &
rhs, const Arithmetic2 &lhs);
253template <
size_t Bits, typename Signed>
256template <
size_t Bits, typename Signed>
259template <
size_t Bits, typename Signed>
std::istream &operator>>(
std::istream &in,
wide_integer<Bits, Signed> &
n);
261template <
size_t Bits, typename Signed>
std::wistream &operator>>(
std::wistream &in,
wide_integer<Bits, Signed> &
n);
275template <
size_t Bits,
typename Signed>
278template <
size_t Bits,
typename Signed>
281inline namespace literals {
282inline namespace wide_integer_literals {
307template <
size_t Bits,
typename Signed>
class numeric_limits<
wide_integer<Bits, Signed>>;
309template <
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)
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
from_chars_result from_chars(const char *first, const char *last, wide_integer< Bits, Signed > &value, int base=10)
std::wstring to_wstring(const wide_integer< Bits, Signed > &n)
to_chars_result to_chars(char *first, char *last, const wide_integer< Bits, Signed > &value, int base=10)
std::string to_string(const wide_integer< Bits, Signed > &n)