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 // 10 // UNSUPPORTED: libcpp-has-no-threads 11 12 // <condition_variable> 13 14 // class condition_variable; 15 16 // typedef pthread_cond_t* native_handle_type; 17 // native_handle_type native_handle(); 18 19 #include <condition_variable> 20 #include <cassert> 21 22 int main() 23 { 24 static_assert((std::is_same<std::condition_variable::native_handle_type, 25 pthread_cond_t*>::value), ""); 26 std::condition_variable cv; 27 std::condition_variable::native_handle_type h = cv.native_handle(); 28 assert(h != nullptr); 29 } 30