Home | History | Annotate | Download | only in array
      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 max_size() 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.max_size());
     28     assert(c.max_size() == 2);
     29     }
     30     {
     31     typedef std::array<int, 0> C;
     32     C c;
     33     ASSERT_NOEXCEPT(c.max_size());
     34     assert(c.max_size() == 0);
     35     }
     36 }
     37