Boost logo

Boost :

From: Maarten Kronenburg (M.Kronenburg_at_[hidden])
Date: 2006-05-26 11:02:46


Gerhard,
Negating an unsigned_integer that is
not zero is like taking the square root
from a negative value, or dividing
an integer by zero:
an exception is thrown.
We are dealing with numeric classes here.
Regards, Maarten.

"Gerhard Wesp" <gwesp_at_[hidden]> wrote in message
news:20060526144945.GG7522_at_google.com...
> On Fri, May 26, 2006 at 04:23:58PM +0200, Maarten Kronenburg wrote:
> > Negating an unsigned integer with value zero is
> > very legitimate.
>
> But the value may be non-zero.
>
> E.g.,
>
> unsigned_integer i = 4711;
> i.negate();
> // i == ??
>
> Having a method that is only defined, but a no-op, in the trivial case
> defies the purpose of having a method.
>
> Regards
> -Gerhard
> --
> Gerhard Wesp
> ZRH office voice: +41 (0)44 668 1878
> ZRH office fax: +41 (0)44 200 1818
> For the rest I claim that raw pointers must be abolished.
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>


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