1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 #define TEST_COMPARE_H
16 explicit test_equal_to() : data_(0) {}
17 explicit test_equal_to(int data
) : data_(data
) {}
18 bool operator()(const T
& a
, const T
& b
) const
20 friend bool operator==(const test_equal_to
& a
, const test_equal_to
& b
)
21 { return a
.data_
== b
.data_
; }
28 explicit test_less() : data_(0) {}
29 explicit test_less(int data
) : data_(data
) {}
30 bool operator()(const T
& a
, const T
& b
) const
32 friend bool operator==(const test_less
& a
, const test_less
& b
)
33 { return a
.data_
== b
.data_
; }
36 #endif // TEST_COMPARE_H