• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cmath and math.h Changes in Xcode 2.4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 14:58:47 -0700

> 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.

Just to clarify, don't do 'using namespace std;' in a header file. This will pollute the namespace of any file that ends up including this header. As I mentioned, OSG's math stuff is in a public header, so this would wreak havoc on people's code.

-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

  • Follow-Ups:
    • Re: Re: Cmath and math.h Changes in Xcode 2.4
      • From: "Lucas Eckels" <email@hidden>
  • Prev by Date: [2.4] Dependency checker confused about a plist resource
  • Next by Date: Re: Cmath and math.h Changes in Xcode 2.4
  • Previous by thread: Re: Cmath and math.h Changes in Xcode 2.4
  • Next by thread: Re: Re: Cmath and math.h Changes in Xcode 2.4
  • Index(es):
    • Date
    • Thread