Skip to content
Welcome to the new CppUtils documentation!
constexpr BasicBigInt::BasicBigInt() = default;

explicit constexpr BasicBigInt::BasicBigInt(std::unsigned_integral auto value);

explicit constexpr BasicBigInt::BasicBigInt(std::signed_integral auto value);

explicit constexpr BasicBigInt::BasicBigInt(std::string_view string);

template <bool OtherSigned>
explicit constexpr BasicBigInt::BasicBigInt(const BasicBigInt<OtherSigned>& other);

[[nodiscard]] constexpr auto BasicBigInt::toBytes() const -> std::vector<std::byte>;

[[nodiscard]] constexpr auto BasicBigInt::isZero() const -> bool;

[[nodiscard]] constexpr auto BasicBigInt::isNegative() const -> bool;

constexpr auto BasicBigInt::setNegative(bool isNegative) -> void;

[[nodiscard]] constexpr auto BasicBigInt::data() const -> const std::vector<std::uint32_t>&;

constexpr auto BasicBigInt::operator+=(const BasicBigInt& other) -> BasicBigInt&;

constexpr auto BasicBigInt::operator+=(std::unsigned_integral auto other) -> BasicBigInt&;

constexpr auto BasicBigInt::operator-=(const BasicBigInt& other) -> BasicBigInt&;

constexpr auto BasicBigInt::operator-=(std::unsigned_integral auto other) -> BasicBigInt&;

constexpr auto BasicBigInt::operator*=(std::uint32_t other) -> BasicBigInt&;

constexpr auto BasicBigInt::operator*=(const BasicBigInt& other) -> BasicBigInt&;

constexpr auto BasicBigInt::operator*=(std::unsigned_integral auto other) -> BasicBigInt&;

constexpr auto BasicBigInt::operator/=(std::unsigned_integral auto divisor) -> BasicBigInt&;

constexpr auto BasicBigInt::operator%=(std::unsigned_integral auto divisor) -> BasicBigInt&;

constexpr auto BasicBigInt::operator>>=(std::size_t shift) -> BasicBigInt&;

constexpr auto BasicBigInt::operator<<=(std::size_t shift) -> BasicBigInt&;

[[nodiscard]] constexpr auto BasicBigInt::operator<=>(const BasicBigInt& other) const;

[[nodiscard]] constexpr auto BasicBigInt::operator==(const BasicBigInt& other) const -> bool;

[[nodiscard]] constexpr auto BasicBigInt::divMod(const BasicBigInt& divisor) const -> std::expected<DivModResult, std::string_view>;

constexpr auto BasicBigInt::operator/=(const BasicBigInt& divisor) -> BasicBigInt&;

constexpr auto BasicBigInt::operator%=(const BasicBigInt& divisor) -> BasicBigInt&;

[[nodiscard]] constexpr auto BasicBigInt::bitLength() const -> std::size_t;

[[nodiscard]] constexpr auto BasicBigInt::operator-() const -> BasicBigInt requires (IsSigned) { auto result = *this; if (not result.isZero()) result.setNegative(not result.isNegative()); return result; } [[nodiscard]] constexpr auto modPow(BasicBigInt exponent, const BasicBigInt& modulus) const -> BasicBigInt;

[[nodiscard]] constexpr auto BasicBigInt::modPow(BasicBigInt exponent, const BasicBigInt& modulus) const -> BasicBigInt;

[[nodiscard]] static constexpr auto BasicBigInt::parse(std::string_view string) -> std::expected<BasicBigInt, std::string_view>;

[[nodiscard]] static constexpr auto BasicBigInt::fromBytes(std::span<const std::byte> bytes) -> BasicBigInt;

constexpr auto blockMask;
constexpr auto byteMask;