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/condition_variable>
15 
16 // class condition_variable;
17 
18 // condition_variable(const condition_variable&) = delete;
19 
20 #include <boost/thread/condition_variable.hpp>
21 
22 #include <boost/static_assert.hpp>
23 #include <boost/detail/lightweight_test.hpp>
24 
main()25 int main()
26 {
27 #if defined BOOST_THREAD_DEFINES_CONDITION_VARIABLE_NATIVE_HANDLE
28   //BOOST_STATIC_ASSERT((boost::is_same<boost::condition_variable::native_handle_type, pthread_cond_t*>::value));
29   boost::condition_variable cv;
30   boost::condition_variable::native_handle_type h = cv.native_handle();
31   BOOST_TEST(h != 0);
32 #else
33 #error "Test not applicable: BOOST_THREAD_DEFINES_CONDITION_VARIABLE_NATIVE_HANDLE not defined for this platform as not supported"
34 #endif
35   return boost::report_errors();
36 }
37 
38