[OpenMP] Adjust 'printf' handling in the OpenMP runtime (#123670)
[llvm-project.git] / libcxx / test / std / thread / thread.latch / try_wait.pass.cpp
blobfa09e5632fbfa52c966a78acbc739ea22166469c
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // UNSUPPORTED: no-threads
10 // UNSUPPORTED: c++03, c++11, c++14, c++17
12 // XFAIL: availability-synchronization_library-missing
14 // <latch>
16 #include <latch>
17 #include <cassert>
19 #include "test_macros.h"
21 int main(int, char**)
23 std::latch l(1);
25 l.count_down();
26 bool const b = l.try_wait();
27 assert(b);
29 return 0;