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
11 
12 // <memory>
13 
14 // shared_ptr
15 
16 // template<class T>
17 // bool
18 // atomic_is_lock_free(const shared_ptr<T>* p);
19 
20 #include <memory>
21 #include <cassert>
22 
main()23 int main()
24 {
25 #if __has_feature(cxx_atomic)
26     {
27         const std::shared_ptr<int> p(new int(3));
28         assert(std::atomic_is_lock_free(&p) == false);
29     }
30 #endif
31 }
32