Boost logo

Boost :

From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2001-10-02 14:12:36

----- Original Message -----
From: Kevin Lynch <krlynch_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Tuesday, October 02, 2001 3:52 PM
Subject: [boost] Re: Math Functions

> [SNIP]
> > 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?
> I disagree that putting the missing functions in std is a bad idea
> (because the whole idea of cmath.hpp was to arrive at a compliant
> <cmath>, requiring injection of missing names into std).
Although my original idea was to provide a private compatibility layer, I
like your approach of introducing missing functions right in std. As long as
those functions *behave* as required (*1), there is no violation here. We
cannot introduce *new* names in std, but this is not what cmath.hpp does, so
your idea is totally comformant .

(*1) AFAIK, there is no requirement on the inner working precision of the
float and long double overloads, so the double implementation used by the
compatibility layer should be comformant.

I've dowloaded your code, but I'm still to provide the Borland specifics in
order to try it.

> However, since
> the REAL goal is to get templatized math functions, come hell or high
> water, it seems that the solution may not be to provide a compliance
> layer for <cmath>, but to use either your suggested approach of
> namespace aliasing, or Fernando's approach of a private conformance
> layer.
> So, my plan now is to try these various approaches, and attempt to fix
> these problems by tomorrow, potentially ditching the idea of fixing
> broken <cmath> headers (although I think that I've got an idea that
> might make it work on other compilers AND gcc AND get compliant <cmath>
> on all platforms, but then again, it might now work). I'll keep you
> apprised of my progress...
I hope you make cmath.hpp work. I think that's the ideal solution. I'll work
on it too as time permits.


Fernando Cacciola
Sierra s.r.l.

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