================ @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -std=c++2c -verify -fsyntax-only %s + +template <unsigned N> +void decompose_array() { + int arr[4] = {1, 2, 3, 5}; + auto [x, ... // #1 + rest, ...more_rest] = arr; // expected-error{{multiple packs in structured binding declaration}} + // expected-note@#1{{previous binding pack specified here}} + // + auto [y...] = arr; // expected-error{{'...' must immediately precede declared identifier}} ---------------- shafik wrote:
Maybe some tests w/ just `...` like ```cpp auto [...] = arr; // error auto [a,...,b] = arr; // error ``` https://github.com/llvm/llvm-project/pull/121417 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits