This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Namespace question
- From: "Gabriel F. T. Gomes" <gftg at linux dot vnet dot ibm dot com>
- To: libstdc++ at gcc dot gnu dot org
- Cc: joseph at codesourcery dot com
- Date: Wed, 8 Mar 2017 23:49:50 -0300
- Subject: Namespace question
- Authentication-results: sourceware.org; auth=none
Hi,
While working on a refactoring in glibc's libm, I came across a
question about namespace for some helper functions in math.h.
Each classification macro in math.h, has a type-specific helper
function, for instance __fpclassifyf for float. We would like to
understand if these functions need to be in a namespace or if, since
they are helper functions, the namespace requirement does not apply.
For instance, is the namespace code in the examples below correct,
required, or even incorrect?
namespace __c99 {
extern int __fpclassifyf (float __value);
extern int __signbit (double __value);
extern int __isinff (float __value);
}
namespace std {
extern int __isinf (double __value);
}
The thread where these question were raised is the following:
https://sourceware.org/ml/libc-alpha/2017-03/msg00123.html
Thank you,
Gabriel