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 // size_type capacity() const;
17 #include "test_macros.h"
18 #include "min_allocator.h"
24 assert(v
.capacity() == 0);
27 std::vector
<bool> v(100);
28 assert(v
.capacity() >= 100);
30 assert(v
.capacity() >= 101);
32 #if TEST_STD_VER >= 11
34 std::vector
<bool, min_allocator
<bool>> v
;
35 assert(v
.capacity() == 0);
38 std::vector
<bool, min_allocator
<bool>> v(100);
39 assert(v
.capacity() >= 100);
41 assert(v
.capacity() >= 101);