blob: a17aa50c5b2198b0c57cc59c4bf345dff3172dfc [file] [log] [blame]
Marshall Clowfc6cc702017-11-15 02:31:14 +00001//===----------------------------------------------------------------------===//
2//
Chandler Carruth57b08b02019-01-19 10:56:40 +00003// 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
Marshall Clowfc6cc702017-11-15 02:31:14 +00006//
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
JF Bastien2df59c52019-02-04 20:31:13 +000021int main(int, char**)
Marshall Clowfc6cc702017-11-15 02:31:14 +000022{
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 }
JF Bastien2df59c52019-02-04 20:31:13 +000035
36 return 0;
Marshall Clowfc6cc702017-11-15 02:31:14 +000037}