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 // thread::id this_thread::get_id(); 17 18 #include <boost/thread/thread_only.hpp> 19 20 #include <boost/detail/lightweight_test.hpp> 21 main()22int main() 23 { 24 boost::thread::id id = boost::this_thread::get_id(); 25 BOOST_TEST(id != boost::thread::id()); 26 return boost::report_errors(); 27 } 28 29