
AMDG DE wrote:
looking at implementation: don't you want to make global integer constants members of enum(s)? as well as static integer constants (haven't noticed so far)
i think that
enum { bits_per_digit = whatever_it_is, digit_hibit = so_does_this, etc };
is better than global objects (defined in a header)
to prove me wrong try to compile two source files including "xint.hpp" and using xint::integer (just for sure) and link them together i expect linker complaints about entities defined in several object files
It will not. const size_t bits_per_digit = std::numeric_limits<digit_t>::digits; is equivalent to static const size_t bits_per_digit = std::numeric_limits<digit_t>::digits; In Christ, Steven Watanabe