Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cmath and math.h Changes in Xcode 2.4 (Mike Jackson)



Looking around it seems the "safer" way to do this is to use the
#define isnan(x) std::isnan(x)


This is very bad because if you have any code that calls std::isnan directly (which is legitimate) i.e. #include <cmath> int main() { std::isnan(0); return 0; }

Then the #define you suggest will transform the call to
std::std::isnan(0);
which is invalid.

If the #define is in a public header (like it is for OpenSceneGraph),
this risks breaking a lot code for people.

-Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.