Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp2a/concepts-friend3.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 // { dg-do compile { target concepts } } | |
2 | |
3 template <class T> concept True = true; | |
4 | |
5 template <True U> struct B { int i = ++U::x; }; | |
6 template <True U> void f() { ++U::x; } | |
7 template <class U> void g() requires True<U> { ++U::x; } | |
8 | |
9 template <class V> class C | |
10 { | |
11 static int x; | |
12 | |
13 template <True U> friend struct B; | |
14 template <True U> friend void f(); | |
15 template <class U> friend void g() requires True<U>; | |
16 }; | |
17 | |
18 int main() | |
19 { | |
20 f<C<int>>(); | |
21 g<C<int>>(); | |
22 B<C<int>>(); | |
23 } |