[PowerPC][NFC] Cleanup PPCCTRLoopsVerify pass
[llvm-project.git] / libcxx / test / std / containers / test_hash.h
blobb37b24908103ab1b9f7836ec0849d56389497663
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_HASH_H
10 #define TEST_HASH_H
12 #include <cstddef>
13 #include <type_traits>
15 template <class C>
16 class test_hash
17 : private C
19 int data_;
20 public:
21 explicit test_hash(int data = 0) : data_(data) {}
23 std::size_t
24 operator()(typename std::add_lvalue_reference<const typename C::argument_type>::type x) const
25 {return C::operator()(x);}
27 bool operator==(const test_hash& c) const
28 {return data_ == c.data_;}
31 #endif // TEST_HASH_H