Remove building with NOCRYPTO option
[minix.git] / external / bsd / libc++ / dist / libcxx / test / containers / test_hash.h
blob1a70e7cbdd9a9f3e240ff981856a62a229e8b2a8
1 //===----------------------------------------------------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
10 #ifndef TEST_HASH_H
11 #define TEST_HASH_H
13 #include <cstddef>
14 #include <type_traits>
16 template <class C>
17 class test_hash
18 : private C
20 int data_;
21 public:
22 explicit test_hash(int data = 0) : data_(data) {}
24 std::size_t
25 operator()(typename std::add_lvalue_reference<const typename C::argument_type>::type x) const
26 {return C::operator()(x);}
28 bool operator==(const test_hash& c) const
29 {return data_ == c.data_;}
32 #endif // TEST_HASH_H