repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[AArch64/arm] PR testsuite/85326 Avoid C++ tests when C++ compiler not present
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
concepts
/
req15.C
blob
53d796c1a8405170e7f00eed6c04d86e830072d0
1
// PR c++/66832
2
// { dg-options "-std=c++17 -fconcepts" }
3
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();
11
}
12
13
struct S {
14
void foo() {}
15
};
16
17
int main() {
18
S rg[4] {};
19
foo_all(rg, rg);
20
}
21