[Arm] Fix generating code with UB in NeonEmitter (#121802)
[llvm-project.git] / libcxx / test / std / containers / container.adaptors / stack / stack.cons / from_range.pass.cpp
blob90f43dc56e499141ae86fd1c3533b0cfd888f613
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 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
11 #include <stack>
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>();
23 });
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>();
31 return 0;