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 //===----------------------------------------------------------------------===//
8 
9 // <array>
10 
11 // class array
12 
13 // bool empty() const noexcept;
14 
15 #include <array>
16 #include <cassert>
17 
18 #include "test_macros.h"
19 #include "min_allocator.h"
20 
21 int main(int, char**)
22 {
23     {
24     typedef std::array<int, 2> C;
25     C c;
26     ASSERT_NOEXCEPT(c.empty());
27     assert(!c.empty());
28     }
29     {
30     typedef std::array<int, 0> C;
31     C c;
32     ASSERT_NOEXCEPT(c.empty());
33     assert( c.empty());
34     }
35 
36   return 0;
37 }
38