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, c++14, c++17
10
11// <atomic>
12//
13// atomic_init
14
15#include <atomic>
16
17void test() {
18 std::atomic<int> a;
19 std::atomic_init(a: &a, i: 1); // expected-warning {{'atomic_init<int>' is deprecated}}
20
21 volatile std::atomic<int> b;
22 std::atomic_init(a: &b, i: 1); // expected-warning {{'atomic_init<int>' is deprecated}}
23}
24

source code of libcxx/test/std/depr/depr.atomics/depr.atomics.nonmembers/atomic_init.depr_in_cxx20.verify.cpp