
Scott McMurray wrote:
I would be interested in a general facility for arbitrary-sized integers (so I could add 2 64-bit numbers on any architecture as bounded_int<65>s, for example, with no possibility of overflow), but that's out of scope for this proposal. (It would be nice if it could be done just with a different allocator, but I don't think that's feasible, currently.)
I am also interested in this. It would be very useful in conjunction with boost::rational. Using gmp's mpq_class for rationals or mp_int with boost::rational is overkill in my case because I can bound the precision I need in a given algorithm to a specific number of bits known at compile time. I would prefer to allocate those as fixed sized bounded integers on the stack instead of dynamically allocating variable sized integers, which would confer significant constant factor improvement in efficiency of both runtime and memory consumption. Luke