Boost logo

Boost :

From: Kevin Lynch (krlynch_at_[hidden])
Date: 2001-10-01 12:19:48

As promised, I've uploaded to the vault a heavily modified version of
Eric Ford's standard_functions.hpp, and a small pile of support files.
They are located in the "std_math" subdirectory of the
"standard_functions" directory that Eric created. A short summary of
what you'll find there:

std_math.hpp: my version of Eric's standard_math.hpp; some of the
functions are commented out because the supporting C89 code doesn't
exist yet in my implementation.

std_math_test.cpp: a poor man's test file. I haven't created a test
file using the boost.test framework, but plan on doing so

math_(def/undef)_macros.hpp: These two files define and undefine macros
used in std_math that I wanted accessible for c99_math.hpp (which would
do for the new c99 math.h functions what std_math is supposed to do for

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.

Some caveats: not all of the functions in the standard yet appear in
std_math.hpp/cmath.hpp, because they take wierd arguments, and will
require more than a one line definition for my compiler (gcc-2.96 on
Intel). Furthermore, cmath.hpp currently only supports gcc-2.96 or
fully compliant <cmath> implementations, by way of
BOOST_HAS_COMPLIANT_CMATH, which you'll need to define if your <cmath>
is in fact compliant (gcc-3.0 appears to be compliant from what I can
tell, but I haven't actually tried it... I don't know about any other
compilers). I have Fernando's notes on the missing functionality in
Borland 5.5.1, but I haven't had a chance to provide the compatibility
layer for that yet. Furthermore, because of a wierdness in pre-3.0 gcc,
the test files may or may not work on non-gcc platforms right now
(pre-3.0, gcc ignores std namespace qualification by default, but I
don't want it to when parsing my cmath.hpp; unfortunately, most names
(like cout, for example) are not defined in std where they belong, so
the compiler can't find them when I force it to not ignore std, via
-fhonor-std ... sigh).

I plan on finishing up with these files tonight or tomorrow, and
updating them when I have them finished. I will transition to
boost.test, try to remove the gcc-isms, and try to provide at least the
additional Borland compatibility stuff that I know about by then. I
just wanted to get out what I'd done like I promised I would.
Unfortunately, I won't see any comments people may have today, but I'll
respond as soon as I get to work tomorrow.

Kevin Lynch				voice:	 (617) 353-6065
Physics Department			Fax: (617) 353-6062
Boston University			office:	 PRB-565
590 Commonwealth Ave.			e-mail:	 krlynch_at_[hidden]
Boston, MA 02215 USA

Boost list run by bdawes at, gregod at, cpdaniel at, john at