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: "E. Wing" <email@hidden>
- Date: Tue, 29 Aug 2006 15:02:47 -0700
From: Eric Albert
I'm curious...is there some reason why you can't simply call isnan()
and remove that block altogether?
-Eric
I might be able to kind-of answer that.
The problem with using isnan directly is that if somebody else
includes <cmath> before this, the <cmath> header undef's isnan so you
must use std::isnan.
The problem with using std::isnan everywhere (I'm told) is not all
platforms/compilers that need to be supported support this. (It
probably doesn't help that isnan is C99 so C++98 can ignore it.) So
OpenSceneGraph tries to wrap this function to provide a consistent
interface. But it must handle all the corner cases. It Apple's case,
originally I think the problem was that 10.2 or pre-10.2 did not
provide isnan or std::isnan so it went to using the __isnan versions.
More recently, the problem has been defined as using gcc 4 or
pre-gcc4, but I'm rather confused by all this as I no longer test on
anything pre-10.4. But certainly on gcc 4/Tiger, std::isnan seems to
be the right thing to do.
-Eric
_______________________________________________
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