2 // RUN: %clang_cc1 -pedantic -std=c++1z -include %s -verify %s
5 // RUN: %clang_cc1 -pedantic -std=c++1z -emit-pch %s -o %t
6 // RUN: %clang_cc1 -pedantic -std=c++1z -include-pch %t -verify %s
11 template<typename T> auto decomp(const T &t) {
16 struct Q { int a, b; };
17 constexpr int foo(Q &&q) {
27 static_assert(foo({1, 2}) == 12);
29 // expected-error@12 {{cannot decompose non-class, non-array type 'const int'}}
30 int z = decomp(10); // expected-note {{instantiation of}}