Re: Cmath and math.h Changes in Xcode 2.4
Re: Cmath and math.h Changes in Xcode 2.4
- Subject: Re: Cmath and math.h Changes in Xcode 2.4
- From: Christopher Hunt <email@hidden>
- Date: Wed, 30 Aug 2006 06:43:14 +1000
I'm not sure why isnan isn't defined for you out of the std namespace
(noting that there are a few mentions of FreeBSD isnan issues on
Google), but hopefully the following will help:
On 30/08/2006, at 5:07 AM, email@hidden wrote:
Looking around it seems the "safer" way to do this is to use the
#define isnan(x) std::isnan(x)
But I don't know anything about anything when it comes to this sort
of thing
in C++ so I do not really know the "correct" way to do this. The
ITK list is
settling on the std::isnan(x) convention. Not sure what track
OpenSceneGraph
took.
The "correct C++" way of doing this is:
#include <cmath>
You can then refer to the isnan function as std::isnan within your
code. Alternatively you can declare:
#include <cmath>
using namespace std;
...and then not have to qualify isnan with std::
Note that the above is not Apple specific.
Cheers,
-C
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden