mirror of
https://github.com/darlinghq/darling-libcxx.git
synced 2025-01-05 18:48:33 +00:00
Add checks to make sure the hash functor has the right typedefs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@225429 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c7e395f338
commit
1fdd937c0a
@ -23,6 +23,10 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
typedef std::hash<std::type_index> H;
|
||||
static_assert((std::is_same<typename H::argument_type, std::type_index>::value), "" );
|
||||
static_assert((std::is_same<typename H::result_type, std::size_t>::value), "" );
|
||||
|
||||
std::type_index t1 = typeid(int);
|
||||
assert(std::hash<std::type_index>()(t1) == t1.hash_code());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user