Boost logo

Boost :

From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2006-05-29 12:55:37

Maarten Kronenburg wrote:

>In my opinion the unsigned integer with a modulus
>is required, which is generalizing the base type
>unsigned int (which is modular) to any modulus.
>So the unsigned_integer would have a static method
>void set_modulus( const integer & ).
>The only problem is what an unsigned_integer is
>when a modulus is not providid, that is when
>the modulus is zero.
>Then I propose that as the user did not provide
>any modulus, only in this case negating a non-zero
>unsigned_integer will be an error.
>Also I propose that such an unsigned_integer will be
>provided by implementations, and be added
>to the specification.
Or you drop unsigned_integer completely (David convinced me that it is
not really needed) and only have a modulus version, which takes the
modulus as a constructor argument. Then negation is always defined.

Sebastian Redl

Boost list run by bdawes at, gregod at, cpdaniel at, john at