xref: /llvm-project/libcxx/test/std/containers/container.adaptors/stack/stack.cons/dtor_noexcept.pass.cpp (revision 09e3a360581dc36d0820d3fb6da9bd7cfed87b5d)
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 // <stack>
10 
11 // ~stack() // implied noexcept;
12 
13 // UNSUPPORTED: c++03
14 
15 #include <stack>
16 #include <cassert>
17 #include <type_traits>
18 
19 #include "test_macros.h"
20 #include "MoveOnly.h"
21 
22 int main(int, char**)
23 {
24     {
25         typedef std::stack<MoveOnly> C;
26         static_assert(std::is_nothrow_destructible<C>::value, "");
27     }
28 
29   return 0;
30 }
31