[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / containers / sequences / vector.bool / get_allocator.pass.cpp
bloba088cd8119abc7a1357d49cdde710e8f4250c4f3
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 // <vector>
11 // class vector<bool>
13 // allocator_type get_allocator() const
15 #include <vector>
16 #include <cassert>
18 #include "test_allocator.h"
19 #include "test_macros.h"
21 TEST_CONSTEXPR_CXX20 bool test() {
23 std::allocator<bool> alloc;
24 const std::vector<bool> vb(alloc);
25 assert(vb.get_allocator() == alloc);
28 other_allocator<bool> alloc(1);
29 const std::vector<bool, other_allocator<bool> > vb(alloc);
30 assert(vb.get_allocator() == alloc);
33 return true;
36 int main(int, char**) {
37 test();
38 #if TEST_STD_VER > 17
39 static_assert(test());
40 #endif
42 return 0;