|
Boost : |
From: Eric Ford (eford_at_[hidden])
Date: 2001-10-01 17:38:08
> cmath.hpp: Because the gcc-2.96 version of <cmath> is so broken, I
> couldn't use it as is. Instead, I took Fernando Cacciola's idea of
> providing a "cmath compatibility" header for compilers/libraries
with
> deficient <cmath>, along the lines of <boost/limits.hpp>. We'll
also
> need to provide a "cstdlib compatibility" header for deficient
<cstdlib>
> integer functions, but I haven't done that yet. That will also be
> easier, since there are only about half a dozen functions math
functions
> defined therein.
>
> cmath_test.cpp: a poor man's test file.
This seg faulted for me due to an infinite recursion in some of the
functions (e.g. cos, fabs) on g++ 2.96. When I replaced your
namespace std with something else, then it worked. (Other than domain
errors from functions that didn't like an argument of 2.)
For this reason and generally being a good namespace citizen, I think
putting things in namespace std is probably a bad idea. What about
instead using some other namespace which can be an alias to std for
well behaved cmath headers and can include what you've written for
non-compliant compilers?
E
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk