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
10 // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
14 #include "../../from_range_sequence_containers.h"
15 #include "test_macros.h"
17 // template<container-compatible-range<T> R>
18 // deque(from_range_t, R&& rg, const Allocator& = Allocator()); // C++23
20 int 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());
26 test_sequence_container_move_only
<std::deque
>();
28 static_assert(test_constraints
<std::deque
, int, double>());
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>();