* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-array-ptr6.C
blob3a483989c1ff1e293353272a3d81734635fb2a38
1 // { dg-do compile { target c++11 } }
3 typedef decltype(sizeof(char)) size_type;
5 template<class T, size_type N>
6 constexpr size_type size(T (&)[N]) { return N; }
8 double array_double[] = { 1.0, 2.0, 3.0 };
10 constexpr auto sz_d = size(array_double);
12 static_assert(sz_d == 3, "Array size failure");
14 void f(bool (&param)[2]) {
15   static_assert(size(param) == 2, "Array size failure"); // Line 13
16   short data[] = {-1, 2, -45, 6, 88, 99, -345};
17   static_assert(size(data) == 7, "Array size failure");