Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. template<class Compare>
  2. class ReverseCompare
  3. {
  4.     ReverseCompare(Compare comp)
  5.         :comp(comp)
  6.     {}
  7.  
  8.     template<class Value>
  9.     bool operator(const Value& a, const Value& b) const
  10.     {
  11.         return !comp(a, b);
  12.     }
  13.  
  14.     Compare comp;
  15. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement