get_id_pass.cpp 862 B

12345678910111213141516171819202122232425262728
  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. // <boost/thread/thread.hpp>
  14. // thread::id this_thread::get_id();
  15. #include <boost/thread/thread_only.hpp>
  16. #include <boost/detail/lightweight_test.hpp>
  17. int main()
  18. {
  19. boost::thread::id id = boost::this_thread::get_id();
  20. BOOST_TEST(id != boost::thread::id());
  21. return boost::report_errors();
  22. }