Re: cmath vs. math.h vs isfinite
Robert Elz <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.toolchain |
|---|---|
| Message-ID | <[email protected]> |
Then after actually looking at the standards, I see that isfinite() (and its friends) are required to be defined as macros, nothing I can see actually demands functions with those names (both the C and POSIX standards say the same). So, the problem is in <cmath> which shouldn't be #undef'ing them if the names are to be allowed to be used from something which includes <cmath> On the other hand, I don't see how <cmath> can define its versions of isfinite (one for each possible floating point type) unless it #undef's the macros -- as otherwise it is just a mess. What all that suggests is a question I wondered about in the first place, but didn't ask in the previous message: What is a C++ program doing calling C library functions, when perfectly sane alternatives are available from C++ ?? If that is what the problem is, then it seems like it might be a python problem - it simply shouldn't be including <math.h> in a C++ program, and it should be using the C++ namespace stuff to get access to the functions it wants to call. kre