1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: no-threads
16 // size_t operator()(T val) const;
25 #include "test_macros.h"
30 std::thread::id id2
= std::this_thread::get_id();
31 typedef std::hash
<std::thread::id
> H
;
32 #if TEST_STD_VER <= 14
33 static_assert((std::is_same
<typename
H::argument_type
, std::thread::id
>::value
), "" );
34 static_assert((std::is_same
<typename
H::result_type
, std::size_t>::value
), "" );
36 ASSERT_NOEXCEPT(H()(id2
));
38 assert(h(id1
) != h(id2
));