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 | // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20 |
10 | |
11 | #include <stack> |
12 | |
13 | #include "../../from_range_container_adaptors.h" |
14 | #include "test_macros.h" |
15 | |
16 | // template<container-compatible-range<T> R> stack(from_range_t, R&& rg); // since C++23 |
17 | // template<container-compatible-range<T> R, class Alloc> |
18 | // stack(from_range_t, R&& rg, const Alloc&); // since C++23 |
19 | |
20 | int main(int, char**) { |
21 | for_all_iterators_and_allocators<int>([]<class Iter, class Sent, class Alloc>() { |
22 | test_container_adaptor<std::stack, std::deque, int, Iter, Sent, Alloc>(); |
23 | }); |
24 | test_container_adaptor_move_only<std::stack>(); |
25 | |
26 | static_assert(test_constraints<std::stack, int, double>()); |
27 | |
28 | test_exception_safety_throwing_copy<std::stack>(); |
29 | test_exception_safety_throwing_allocator<std::stack, int>(); |
30 | |
31 | return 0; |
32 | } |
33 | |