• 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: :min, std::max
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: :min, std::max


  • Subject: Re: :min, std::max
  • From: Paul Walmsley <email@hidden>
  • Date: Tue, 25 Oct 2005 09:39:24 +0100


And of course this can be fixed by doing
#undef min
#undef max
after including any C header.

But sometimes I find this can cause problems if you're using precompiled headers -- you may need to fiddle with the ordering of your inclusions. It's a pain when you have C headers that define min and max. My solution is usually to duplicate std::min and max but call it something slightly different, eg MaxValue()


_______________________________________________
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: :min, std::max
      • From: Andreas Grosam <email@hidden>
References: 
 >RE: :min, std::max (From: "Carl Smith" <email@hidden>)
 >Re: :min, std::max (From: Chris Espinosa <email@hidden>)
 >Re: :min, std::max (From: Tommy Nordgren <email@hidden>)

  • Prev by Date: Re: ObjC novice quick critique request
  • Next by Date: Gcc 3.3 build problem between Xcode 1.2 and 2.1, and OSX 10.3 and 10.4
  • Previous by thread: Re: :min, std::max
  • Next by thread: Re: :min, std::max
  • Index(es):
    • Date
    • Thread