|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2006-05-27 22:48:51
"Maarten Kronenburg" <M.Kronenburg_at_[hidden]> writes:
> Douglas,
> This is the same discussion I had with
> Gehard about the negate().
> 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.
Opening up the interface for to negation just because it somehow
"makes sense" for one singular value of the type, thereby turning a
static check into a dynamic one, seems like a terribly flawed design
choice to me.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk