xref: /llvm-project/libcxx/test/std/containers/container.adaptors/queue/queue.cons/from_range.pass.cpp (revision 87f3ff3e55e67709c3455a7ba105424be8ae84f2)
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 <queue>
12 
13 #include "../../from_range_container_adaptors.h"
14 #include "test_macros.h"
15 
16 // template<container-compatible-range<T> R> queue(from_range_t, R&& rg); // since C++23
17 // template<container-compatible-range<T> R, class Alloc>
18 //   queue(from_range_t, R&& rg, const Alloc&); // since C++23
19 
main(int,char **)20 int main(int, char**) {
21   for_all_iterators_and_allocators<int>([]<class Iter, class Sent, class Alloc>() {
22     test_container_adaptor<std::queue, std::deque, int, Iter, Sent, Alloc>();
23   });
24   test_container_adaptor_move_only<std::queue>();
25 
26   static_assert(test_constraints<std::queue, int, double>());
27 
28   test_exception_safety_throwing_copy<std::queue>();
29   test_exception_safety_throwing_allocator<std::queue, int>();
30 
31   return 0;
32 }
33