1//===----------------------------------------------------------------------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10// <vector>
11// vector<bool>
12
13// size_type capacity() const;
14
15#include <vector>
16#include <cassert>
17
18#include "min_allocator.h"
19
20int main()
21{
22    {
23        std::vector<bool> v;
24        assert(v.capacity() == 0);
25    }
26    {
27        std::vector<bool> v(100);
28        assert(v.capacity() >= 100);
29        v.push_back(0);
30        assert(v.capacity() >= 101);
31    }
32#if TEST_STD_VER >= 11
33    {
34        std::vector<bool, min_allocator<bool>> v;
35        assert(v.capacity() == 0);
36    }
37    {
38        std::vector<bool, min_allocator<bool>> v(100);
39        assert(v.capacity() >= 100);
40        v.push_back(0);
41        assert(v.capacity() >= 101);
42    }
43#endif
44}
45