Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/concepts-placeholder10.C

raw
1 // { dg-do compile { target c++20 } }
2 // { dg-options "-Wno-pedantic" }
3
4 template <class T> concept is_const = __is_same(T, const T);
5
6 void f() {
7 int x[] = {1,2};
8 const int y[] = {3};
9 const is_const auto [a,b] = x; // { dg-error "constraints" }
10 const is_const auto [c] = y;
11 }