]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/thread/test/threads/thread/id/hash_pass.cpp
1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
9 // Copyright (C) 2011 Vicente J. Botet Escriba
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)
14 // <boost/thread/thread.hpp>
20 // : public unary_function<T, size_t>
22 // size_t operator()(T val) const;
26 #include <boost/thread/thread_only.hpp>
27 #include <boost/detail/lightweight_test.hpp>
32 boost::thread::id id1
;
33 boost::thread::id id2
= boost::this_thread::get_id();
34 typedef boost::hash
<boost::thread::id
> H
;
36 BOOST_TEST(h(id1
) != h(id2
));
38 return boost::report_errors();