[AArch64/arm] PR testsuite/85326 Avoid C++ tests when C++ compiler not present
[official-gcc.git] / gcc / testsuite / g++.dg / concepts / req15.C
blob53d796c1a8405170e7f00eed6c04d86e830072d0
1 // PR c++/66832
2 // { dg-options "-std=c++17 -fconcepts" }
4 template <class T, class U, unsigned N>
5   requires requires (T& t, U &u) { t.foo(); u.foo(); }
6 void foo_all( T (&t)[N], U (&u)[N] ) {
7   for(auto& x : t)
8       x.foo();
9   for(auto& x : u)
10       x.foo();
13 struct S {
14   void foo() {}
17 int main() {
18   S rg[4] {};
19   foo_all(rg, rg);