Boost logo

Boost :

From: Eric Ford (eford_at_[hidden])
Date: 2001-09-27 16:11:50


> Meanwhile, I have added the files: cvt_n.h, numeric_bounds.h and
> generic_math.h to the "standard_functions" directory you've created.
> They are there for reference only!
> Perhaps we can get some others to look at 'cvt_n.h' and
'numeric_bounds.h'
> (hint, hint).

In cvt_n.h: Any reason you use the T(x) syntax for the type
conversion rather than static_cast<T>(x)?

> The file generic_math is not intended to compete with your
> 'standard_fucntions.hpp' header. I've uploaded only to give a view
of the
> *other* functions and stuff I have found useful for generic numeric
code.

I'm not entirely happy with your Rounder. Obviously, there are
several rounding schemes. First, yours appears to be just for
rounding to integers. That's fine, but then a longer name may be in
order, since a function that rounds to some arbitrary level may
eventaully be added. Second, there's truncate non-integral part,
round towards zero, round towards -INF, round towards even integer,
round to nearest int (with different ways of treating a half). Does a
policy based rounder sound like overkill?

> I will comment on your 'standard functions' as soon as I finished
> reviewing it.

Thanks,
E


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