1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // UNSUPPORTED: libcpp-has-no-threads
12 // This test uses new symbols that were not defined in the libc++ shipped on
13 // darwin11 and darwin12:
14 // XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
15 // XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
23 // atomic_exchange(shared_ptr<T>* p, shared_ptr<T> r)
25 // UNSUPPORTED: c++98, c++03
30 #include "test_macros.h"
35 std::shared_ptr<int> p(new int(4));
36 std::shared_ptr<int> r(new int(3));
37 r = std::atomic_exchange(&p, r);