~ubuntu-branches/ubuntu/wily/davix/wily

« back to all changes in this revision

Viewing changes to deps/boost_intern/src/thread/test/threads/thread/id/hash_pass.cpp

  • Committer: Package Import Robot
  • Author(s): Mattias Ellert
  • Date: 2015-07-31 13:17:55 UTC
  • mfrom: (5.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20150731131755-mizprbmn7ogv33te
Tags: 0.4.1-1
* Update to version 0.4.1
* Implement Multi-Arch support

Show diffs side-by-side

added added

removed removed

Lines of Context:
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