// RUN: %clang_cc1 -std=c++1z -verify %s
structA{int x, y;};typedefint B[2];structC{template<int>intget();};structD{int x, y, z;};structE{int*p, n;};namespacestd{usingsize_t=decltype(sizeof(0));template<typename>structtuple_size;template<size_t,typename>structtuple_element{using type =int;};}template<>structstd::tuple_size<C>{enum{ value =2};};template<typename T>intdecomp(T &t){auto&[a, b]= t;// expected-error {{type 'D' decomposes into 3 elements, but only 2 names were provided}}
return a + b;// expected-error {{cannot initialize return object of type 'int' with an rvalue of type 'int *'}}
}voidtest(){
A a;
B b;
C c;
D d;
E e;decomp(a);decomp(b);decomp(c);decomp(d);// expected-note {{in instantiation of}}
decomp(e);// expected-note {{in instantiation of}}
}