Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp2a/concepts-requires9.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
line wrap: on
line source
// PR c++/66832 // { dg-do compile { target c++2a } } template <class T, class U, unsigned N> requires requires (T& t, U &u) { t.foo(); u.foo(); } void foo_all( T (&t)[N], U (&u)[N] ) { for(auto& x : t) x.foo(); for(auto& x : u) x.foo(); } struct S { void foo() {} }; int main() { S rg[4] {}; foo_all(rg, rg); }