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 //===----------------------------------------------------------------------===//
13 // size_type size() const noexcept;
18 #include "test_macros.h"
19 #include "min_allocator.h"
24 typedef std::vector
<bool> C
;
26 ASSERT_NOEXCEPT(c
.size());
27 assert(c
.size() == 0);
29 assert(c
.size() == 1);
31 assert(c
.size() == 2);
33 assert(c
.size() == 3);
35 assert(c
.size() == 2);
37 assert(c
.size() == 1);
39 assert(c
.size() == 0);
41 #if TEST_STD_VER >= 11
43 typedef std::vector
<bool, min_allocator
<bool>> C
;
45 ASSERT_NOEXCEPT(c
.size());
46 assert(c
.size() == 0);
48 assert(c
.size() == 1);
50 assert(c
.size() == 2);
52 assert(c
.size() == 3);
54 assert(c
.size() == 2);
56 assert(c
.size() == 1);
58 assert(c
.size() == 0);