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