[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / containers / sequences / vector.bool / construct_from_range.pass.cpp
blob03f3100b928833adde7f74e6ce170eb0b96a3d2d
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 <vector>
13 #include "../from_range_sequence_containers.h"
14 #include "test_macros.h"
16 // template<container-compatible-range<T> R>
17 // vector(from_range_t, R&& rg, const Allocator& = Allocator()); // C++23
19 constexpr bool test() {
20 for_all_iterators_and_allocators<bool>([]<class Iter, class Sent, class Alloc>() {
21 test_vector_bool<Iter, Sent, Alloc>([]([[maybe_unused]] const auto& c) {
22 LIBCPP_ASSERT(c.__invariants());
23 // `is_contiguous_container_asan_correct` doesn't work on `vector<bool>`.
24 });
25 });
27 return true;
30 int main(int, char**) {
31 test();
32 static_assert(test());
34 static_assert(test_constraints<std::vector, bool, char>());
36 // Note: test_exception_safety_throwing_copy doesn't apply because copying a boolean cannot throw.
37 test_exception_safety_throwing_allocator<std::vector, bool>();
39 return 0;