
On 30 Mar 2010, at 22:47, Scott McMurray wrote:
On 30 March 2010 17:40, Chad Nelson <chad.thecomfychair@gmail.com> wrote:
Well, it's not called an "infinite range integer," after all. :-) Just an unlimited one, because the library does not place any limits on it. Only available memory, and the time needed to operate on something that large, do.
The library *does* impose a limit: It has to allocate space, so there's necessarily the limit implied by the size of the type passed to the allocator to request the space.
Take, for instance:
pow(xint(-1u), xint(-1u))
That should probably throw an overflow error from checking ahead of time that the amount of memory requested is infeasible in the same way as std::vector<int>(-1) will throw a std::length_error.
By the same argument, should we changed the hashed containers to "dynamically unspecified size hashed containers"? Chris