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: libcpp-has-no-threads 10 // 11 // This test uses new symbols that were not defined in the libc++ shipped on 12 // darwin11 and darwin12: 13 // XFAIL: availability=macosx10.7 14 // XFAIL: availability=macosx10.8 15 16 // <memory> 17 18 // shared_ptr 19 20 // template <class T> 21 // shared_ptr<T> 22 // atomic_load(const shared_ptr<T>* p) 23 24 // UNSUPPORTED: c++98, c++03 25 26 #include <memory> 27 #include <cassert> 28 29 #include "test_macros.h" 30 31 int main(int, char**) 32 { 33 { 34 std::shared_ptr<int> p(new int(3)); 35 std::shared_ptr<int> q = std::atomic_load(&p); 36 assert(*q == *p); 37 } 38 39 return 0; 40 } 41