blob: 2c01dfc86c19e26ef52c8554b4374dc4e48b3f91 [file] [log] [blame]
Marshall Clowfc6cc702017-11-15 02:31:14 +00001//===----------------------------------------------------------------------===//
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// <array>
11
12// class array
13
14// bool empty() const noexcept;
15
16#include <array>
17#include <cassert>
18
19#include "test_macros.h"
20#include "min_allocator.h"
21
22int main()
23{
24 {
25 typedef std::array<int, 2> C;
26 C c;
27 ASSERT_NOEXCEPT(c.empty());
28 assert(!c.empty());
29 }
30 {
31 typedef std::array<int, 0> C;
32 C c;
33 ASSERT_NOEXCEPT(c.empty());
34 assert( c.empty());
35 }
36}