From: Guillaume Melquiond (gmelquio_at_[hidden])
Date: 2003-05-14 07:02:25
On Wed, 14 May 2003, Peter Dimov wrote:
> Guillaume Melquiond wrote:
> > Your patch does not fix the problem at all. In my opinion, it can even
> > break some working configurations. I would rather use this
> > conditional expression:
> > # if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0 || _CPPLIB_VER
> > == 310)) && !defined(_STD)
> > since the test _GLOBAL_USING+0 > 0 is false although we want it true
> > with Dinkumware 3.10 (_CPPLIB_VER == 310 and maybe other versions but
> > I don't know them).
> Testing _CPPLIB_VER is incorrect. AFAICS _GLOBAL_USING means "import
> identifiers from the global namespace into std:: via using declarations."
> _GLOBAL_USING can be 0 when the C library headers put identifiers in std::
> and ::, as is probably the case for Intel/Linux; no further "postprocessing"
> is necessary.
I am not sure to understand what you mean by "postprocessing". There is
actually a lot of code in the cmath file of the Dinkumware library that is
used after the inclusion of math.h in order to put all relevants C
functions in std:: namespace. So yes there is some postprocessing.
Moreover, some of the functions are only available in std:: since they are
directly defined by the library.
> Under Windows, the C library headers do not put identifiers in std::, and
> _GLOBAL_USING=1 can be used as a test whether the identifiers have been
> imported into std:: by the <c*> headers. Note that this does not depend on
It's quite problematic that the meaning of _GLOBAL_USING depends on the
> I think that the right thing to do here is to specifically test for the
> problematic configuration (i.e. __ICC && __linux) to avoid breaking
> Dinkumware 3.10 on other platforms.
I think it's a bit too much: an user may want to use the Dinkumware
library on Linux without Intel compiler. But I won't complain too much: if
it's enough to fix the particular platform I use, I will be happy :-).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk