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
11// <memory>
12
13// shared_ptr
14
15// template<class T>
16// bool
17// atomic_is_lock_free(const shared_ptr<T>* p);
18
19// UNSUPPORTED: c++03
20
21#include <memory>
22#include <cassert>
23
24#include "test_macros.h"
25
26int main(int, char**)
27{
28 {
29 const std::shared_ptr<int> p(new int(3));
30 assert(std::atomic_is_lock_free(&p) == false);
31 }
32
33 return 0;
34}
35

source code of libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_is_lock_free.pass.cpp