From: Eric Ford (eford_at_[hidden])
Date: 2001-10-04 02:36:12
> Comments and criticisms will all be addressed asap, although asap
> not be tonight :-) But send them in nonetheless. Also,
> other platforms cmath compliance would be nice, so send that
> in if you have please! And thanks in advance.
Is there a reason why you use define's to deal with the std_compat
namespace? Why not just use std_compat and make std_compat an alias
to std, iff the cmath is compliant?
MAKE_STD_FUNCTION_REAL2 (and SPECIALIZE_...) need to be able to deal
with arguments of differing types. More template arguments...
ldexp will either need to take two template arguments (even though we
know the second should be an int) or be done separately. I'd vote for
the former, since it generates a compile time error if there's not an
appropriately specialized version anyway.
For something like sin, I think it's reasonable to generate a compile
errror for calling it with an int (I'd guess a call with an int is
more often an error). However, for pow, I think we should specialize
to allow for integers (more likely to be intentional). I'm not sure
whether it's appropriate to have the specializations perform
optimzations in this layer, so maybe just convert both arguments to
the longer type. Fernado posted some simple type promotion code a
while ago, which seems reasonable.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk