Open saxbophone opened 2 years ago
constexpr codlili::List<bool> Nat::bits() const; constexpr Nat::Nat(const codlili::List<bool>& bits); template <std::size_t N> constexpr Nat::Nat(const std::bitset<N>& bits);
We can use std::bitset to take a shortcut when converting to bits (make a bitset for each digit and read bits out of them in sequence).
std::bitset
Related to #83, #114
Dropped from v0.5 milestone —if we're going to read bits, we should probably support writing them (via ctor) too, that is too much work for the meagre benefit right now.
We can use
std::bitset
to take a shortcut when converting to bits (make a bitset for each digit and read bits out of them in sequence).Related to #83, #114