]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/thread/test/threads/thread/id/hash_pass.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / thread / test / threads / thread / id / hash_pass.cpp
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 //===----------------------------------------------------------------------===//
9 // Copyright (C) 2011 Vicente J. Botet Escriba
10 //
11 // Distributed under the Boost Software License, Version 1.0. (See accompanying
12 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
13
14 // <boost/thread/thread.hpp>
15
16 // <functional>
17
18 // template <class T>
19 // struct hash
20 // : public unary_function<T, size_t>
21 // {
22 // size_t operator()(T val) const;
23 // };
24
25
26 #include <boost/thread/thread_only.hpp>
27 #include <boost/detail/lightweight_test.hpp>
28
29 int main()
30 {
31 {
32 boost::thread::id id1;
33 boost::thread::id id2 = boost::this_thread::get_id();
34 typedef boost::hash<boost::thread::id> H;
35 H h;
36 BOOST_TEST(h(id1) != h(id2));
37 }
38 return boost::report_errors();
39 }
40