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 //===----------------------------------------------------------------------===//
12 // void reserve(size_type n);
17 #include "test_macros.h"
18 #include "min_allocator.h"
25 assert(v
.capacity() >= 10);
28 std::vector
<bool> v(100);
29 assert(v
.capacity() >= 100);
31 assert(v
.size() == 100);
32 assert(v
.capacity() >= 100);
34 assert(v
.size() == 100);
35 assert(v
.capacity() >= 150);
37 #if TEST_STD_VER >= 11
39 std::vector
<bool, min_allocator
<bool>> v
;
41 assert(v
.capacity() >= 10);
44 std::vector
<bool, min_allocator
<bool>> v(100);
45 assert(v
.capacity() >= 100);
47 assert(v
.size() == 100);
48 assert(v
.capacity() >= 100);
50 assert(v
.size() == 100);
51 assert(v
.capacity() >= 150);