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 // <stack>
11 
12 // void swap(stack& c)
13 //     noexcept(__is_nothrow_swappable<container_type>::value);
14 
15 // This tests a conforming extension
16 
17 // UNSUPPORTED: c++98, c++03
18 
19 #include <stack>
20 #include <cassert>
21 
22 #include "MoveOnly.h"
23 
24 int main()
25 {
26     {
27         typedef std::stack<MoveOnly> C;
28         C c1, c2;
29         static_assert(noexcept(swap(c1, c2)), "");
30     }
31 }
32