|
Boost : |
From: Eric Ford (eford_at_[hidden])
Date: 2001-09-27 14:34:09
> * a numeric_traits<> class providing functionality beyond
numeric_limits()
> (and including it itself).
> I have one, in which I added a numeric_bounds<> class.
> numeric_bounds<> gives a consistent semantic to boundary values
> (remember that numeric_limits::min has different semantics
depending on
> whether the type is integer or floating point).
I wonder if a min_const static member would also be a good idea so as
to allow things like overflow checking for compile time operations
(e.g. checking for an overflow on lcm came up recently).
> * a numeric_cast<> facility (we have one already, though I tried
before to
> draw attention to some issues about this one)
I agree with you here. I wonder if it might could be implemented a
little more simplely than your code. But I didn't produce anything
better. I think this is a serious issue. As long as numeric_cast<>
is as inefficient as it presently is, it can not be considered an
option for use in numerically intensive code. I'd encourage people to
look at adding yor optimizations (either your or another
implementation) to boost::numeric cast.
E
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk