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: c++98, c++03, c++11, c++14
12 // XFAIL: availability=macosx10.13
13 // XFAIL: availability=macosx10.12
14 // XFAIL: availability=macosx10.11
15 // XFAIL: availability=macosx10.10
16 // XFAIL: availability=macosx10.9
17 // XFAIL: availability=macosx10.8
18 // XFAIL: availability=macosx10.7
22 // void swap(any &, any &) noexcept
24 // swap(...) just wraps any::swap(...). That function is tested elsewhere.
37 static_assert(noexcept(swap(a, a)), "swap(any&, any&) must be noexcept");
45 assert(any_cast<int>(a1) == 2);
46 assert(any_cast<int>(a2) == 1);