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 // tuple_size<array<T, N> >::value 13 14 #include <array> 15 16 template <class T, std::size_t N> 17 void test() 18 { 19 { 20 typedef std::array<T, N> C; 21 static_assert((std::tuple_size<C>::value == N), ""); 22 } 23 { 24 typedef std::array<T const, N> C; 25 static_assert((std::tuple_size<C>::value == N), ""); 26 } 27 { 28 typedef std::array<T volatile, N> C; 29 static_assert((std::tuple_size<C>::value == N), ""); 30 } 31 { 32 typedef std::array<T const volatile, N> C; 33 static_assert((std::tuple_size<C>::value == N), ""); 34 } 35 } 36 37 int main() 38 { 39 test<double, 0>(); 40 test<double, 3>(); 41 test<double, 5>(); 42 } 43