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// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
11
12#include <deque>
13
14#include "../../from_range_sequence_containers.h"
15#include "test_macros.h"
16
17// template<container-compatible-range<T> R>
18// deque(from_range_t, R&& rg, const Allocator& = Allocator()); // C++23
19
20int main(int, char**) {
21 for_all_iterators_and_allocators<int>([]<class Iter, class Sent, class Alloc>() {
22 test_sequence_container<std::deque, int, Iter, Sent, Alloc>([]([[maybe_unused]] const auto& c) {
23 LIBCPP_ASSERT(c.__invariants());
24 });
25 });
26 test_sequence_container_move_only<std::deque>();
27
28 static_assert(test_constraints<std::deque, int, double>());
29
30 // TODO(varconst): `deque`'s constructors currently aren't exception-safe.
31 // See https://github.com/llvm/llvm-project/issues/62056.
32 //test_exception_safety_throwing_copy<std::deque>();
33 //test_exception_safety_throwing_allocator<std::deque, int>();
34
35 return 0;
36}
37

source code of libcxx/test/std/containers/sequences/deque/deque.cons/from_range.pass.cpp