This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
std::isinfinite
- From: Mateusz Loskot <mateusz at loskot dot net>
- To: libstdc++ at gcc dot gnu dot org
- Date: Sat, 30 Sep 2006 20:41:11 +0200
- Subject: std::isinfinite
Hi,
I'd like to ask, why libstdc++ for GCC 4.0.3 declares
isfinite() in std:: namespaces?
I see in cmath headers, there is following definition:
isfinite(_Tp __f) { return __gnu_cxx::__capture_isfinite(__f); }
There is also a comment in the file saying:
(...) remove possible C99-injected names from the global namespace, and
sequester them in the __gnu_cxx extension namespace.(...)
Does is mean __gnu_cxx extensions are pushed into std:: namespace?
I'd be thankful for some enlightenment.
Also, what's the best practice to avoid C99 extensions from
GCC/libstdc++, when compiling C++ portable code / C++ standard compliant.
Unfortunately, following compilation options do not prevent from using
isfinite() function, a C99-based extension as I understand.
g++ -Wall -pedantic -ansi -std=c++98 isinfinite.cpp
Cheers
--
Mateusz Loskot
http://mateusz.loskot.net