[AArch64] Add fpext and fpround costs (#119292)
[llvm-project.git] / libcxx / test / std / containers / test_compare.h
blob1b4c4916b33745aff5d6cea7c7a2dc16df662736
1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef TEST_COMPARE_H
10 #define TEST_COMPARE_H
12 template <class T>
13 struct test_equal_to
15 int data_;
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
19 { return a == b; }
20 friend bool operator==(const test_equal_to& a, const test_equal_to& b)
21 { return a.data_ == b.data_; }
24 template <class T>
25 struct test_less
27 int 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
31 { return a < b; }
32 friend bool operator==(const test_less& a, const test_less& b)
33 { return a.data_ == b.data_; }
36 #endif // TEST_COMPARE_H