libcxx initial import
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@103490 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
23
test/containers/test_hash.h
Normal file
23
test/containers/test_hash.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef TEST_HASH_H
|
||||
#define TEST_HASH_H
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
template <class C>
|
||||
class test_hash
|
||||
: private C
|
||||
{
|
||||
int data_;
|
||||
public:
|
||||
explicit test_hash(int data = 0) : data_(data) {}
|
||||
|
||||
std::size_t
|
||||
operator()(typename std::add_lvalue_reference<const typename C::argument_type>::type x) const
|
||||
{return C::operator()(x);}
|
||||
|
||||
bool operator==(const test_hash& c) const
|
||||
{return data_ == c.data_;}
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user