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: c++03, c++11
10 // REQUIRES: availability-synchronization_library-missing
11
12 // Test the availability markup on std::latch.
13
14 #include <latch>
15
f()16 void f() {
17 std::latch latch(10);
18 latch.count_down(); // expected-error {{is unavailable}}
19 latch.count_down(3); // expected-error {{is unavailable}}
20 latch.wait(); // expected-error {{is unavailable}}
21 latch.arrive_and_wait(); // expected-error {{is unavailable}}
22 latch.arrive_and_wait(3); // expected-error {{is unavailable}}
23 }
24