1 // RUN: %clang_cc1 -std=c++1z -verify %s -Wpedantic
9 static int arr
[3] = {};
11 static_assert(&a
!= &arr
[0]);
14 auto [a2
, b2
, c2
] = I3
{1, 2, 3};
17 auto [a3
, b3
, c3
] = X3
{1, 2, 3};
19 auto &[d
, e
] = arr
; // expected-error {{type 'int[3]' decomposes into 3 elements, but only 2 names were provided}}
20 auto &[f
, g
, h
, i
] = arr
; // expected-error {{type 'int[3]' decomposes into 3 elements, but 4 names were provided}}
22 auto &[r0
, r1
, r2
] = arr
;
23 const auto &[cr0
, cr1
, cr2
] = arr
;
25 static_assert(&arr
[0] == &r0
);
26 static_assert(&arr
[0] == &cr0
);
29 using T
= decltype(r0
);
31 using U
= decltype(cr0
);