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

source code of libcxx/test/std/containers/container.adaptors/stack/stack.cons/move_assign_noexcept.pass.cpp