saxbophone / arby

Arbitrary precision arithmetic in C++, even at compile-time
https://saxbophone.com/arby/
Mozilla Public License 2.0
8 stars 1 forks source link

Nat.digits() read-only accessor and Nat::Nat({ ...digits sequence...}) ctor #114

Closed saxbophone closed 2 years ago

saxbophone commented 2 years ago
constexpr const codlili::List<StorageType> digits() const { ... }

constexpr Nat(std::initializer_list<StorageType> digits) { ... }
constexpr Nat(std::span<StorageType> digits) { ... }
// requires Iterable<StorageType>.begin(), Iterable<StorageType>.end() to be valid statements
template <typename Iterable>
constexpr Nat(Iterable<StorageType> digits) { ... }