[Bug libstdc++/44611] Including <math.h> and <cmath> hides ::signbit function

redi at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Jun 21 14:52:00 GMT 2010



------- Comment #5 from redi at gcc dot gnu dot org  2010-06-21 14:52 -------
But should std::signbit be available as ::signbit when <math.h> is included, at
least for c++0x mode?

[depr.c.headers]/2 says
"Every C header, each of which has a name of the form name.h, behaves as if
each name placed in the standard library namespace by the corresponding cname
header is placed within the global namespace scope."

signbit is placed in namespace std by <cmath> which says to me that it should
be placed in the global namespace by <math.h>

(I'm still unsure whether the same applies to <stddef.h> and std::nullptr_t)


-- 

redi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |libstdc++


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44611



More information about the Gcc-bugs mailing list