1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
13 #include "../../from_range_container_adaptors.h"
14 #include "test_macros.h"
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
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
>();
24 test_container_adaptor_move_only
<std::stack
>();
26 static_assert(test_constraints
<std::stack
, int, double>());
28 test_exception_safety_throwing_copy
<std::stack
>();
29 test_exception_safety_throwing_allocator
<std::stack
, int>();