• 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: "W. Douglas Maurer" <email@hidden>
  • Date: Wed, 26 Oct 2005 11:57:31 -0400

Often people #define min(x,y) (x < y ? x : y) and that will be expanded in the definition of std:: min, which will blow up.

And that doesn't always work either; for example, then min(++j, k) expands to (++j < k ? ++j : k) which can return j incremented twice.
--
Prof. W. Douglas Maurer Washington, DC 20052, USA
Department of Computer Science Tel. (1-202)994-5921
The George Washington University Fax (1-202)994-4875
NEW E-MAIL ADDRESS email@hidden
_______________________________________________
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
References: 
 >RE: :min, std::max (From: "Carl Smith" <email@hidden>)
 >Re: :min, std::max (From: Chris Espinosa <email@hidden>)

  • Prev by Date: RE: :min, std::max
  • Next by Date: Re: More problems! Building C project (Xcode 1.2 -> 2.1)
  • Previous by thread: Re: :min, std::max
  • Next by thread: Re: :min, std::max
  • Index(es):
    • Date
    • Thread