Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#ActualParadigm Shifter

Posted 31 May 2013 - 01:15 PM

That's just the way it is ;) Usually you would be sorting a list which is a member of a class and you can just typedef the predicate function inside the class if you use it a lot. std::map takes the comparison predicate as a template parameter which is available as a typedef called key_compare, for example. You can use multiple typedefs for multiple predicates if you want.


#1Paradigm Shifter

Posted 31 May 2013 - 01:14 PM

That's just the way it is ;) Usually you would be sorting a list which is a member of a class and you can just typedef the sort function inside the class if you use it a lot. std::map takes the comparison predicate as a template parameter which is available as a typedef called key_compare, for example.


PARTNERS