• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef TEST_COMPARE_H
2 #define TEST_COMPARE_H
3 
4 #include <cstddef>
5 #include <type_traits>
6 #include <cstdlib>
7 #include <new>
8 #include <climits>
9 
10 template <class C>
11 class test_compare
12     : private C
13 {
14     int data_;
15 public:
data_(data)16     explicit test_compare(int data = 0) : data_(data) {}
17 
18     typename C::result_type
operator()19     operator()(typename std::add_lvalue_reference<const typename C::first_argument_type>::type x,
20                typename std::add_lvalue_reference<const typename C::second_argument_type>::type y) const
21         {return C::operator()(x, y);}
22 
23     bool operator==(const test_compare& c) const
24         {return data_ == c.data_;}
25 };
26 
27 #endif  // TEST_COMPARE_H
28