Marshall Clow | fc6cc70 | 2017-11-15 02:31:14 +0000 | [diff] [blame] | 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 | // <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 | |
| 22 | int 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 | } |