This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Where is C++'s math.h's double abs(double)?



> " Each C header, whose name has the form name.h, behaves as if each name 
> placed in the Standard library namespace by the corresponding cname header is 
> also placed within the namespace scope of the name-space std and is followed 
> by an explicit using-declaration (7.3.3) 3 

yeah yeah yeah

:)

You are right, of course.

> [Example: The header <cstdlib> provides its declarations and definitions 
> within the namespace std. The header <stdlib.h> makes these available in the 
> global name space, much as in the C Standard.  end example]"
> 
> thus <math.h> should make available in the global namespace all of the 
> defintions in cmath.  The default configuration doesnt do this; instead one 
> must specify "--enable-cheaders=c_shadow"; however that may not bootstrap (it 
> doesnt on linux-x86).

The c_shadow headers are in a pretty sorry state right now. Part of me 
just thinks that a c_std solution should exist that just puts all the 
std:: stuff back into ::. 

Anyway. 

Stephen Webb has a partial solution for this problem under solaris 2.8.
http://gcc.gnu.org/ml/libstdc++/2001-03/msg00161.html

I'm really reluctant to have yet another "partial" "incomplete" "in 
theory"  c header thing go in. I'm still smarting over c_shadow. I'd 
rather have something that works from the get-go, and has an active 
maintainer who will fix problems when they (invariably) come up.

Anyway.

-benjamin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]