Boost logo

Boost :

From: Pedro Lamarão (pedro.lamarao_at_[hidden])
Date: 2006-05-30 10:07:26


Maarten Kronenburg escreveu:

[SNIP]

> Negating an unsigned with value zero
> is perfectly legal.
> When it is not zero, it can throw an exception,
> as a good numeric class is supposed to do.

I disagree.

Infinite integer objects will probably live inside long, inner loops;
inside those loops what you _don't want_ is the overhead of a try/catch
block. (Or any kind of overhead, for that matter.)

Such a loop should be written not to break infinite integer arithmetic
rules instead; and to help users achieve this, the infinite integer
library should allow the least possible possibilities of rule-breaking.

And do that at compile time, for maximum performance.

--
 Pedro Lamarão

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk