blob: 4278278b9dfc383503bf84247f6ded588ea237a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// { dg-do compile { target concepts } }
template <class T> concept True = true;
template <True U> struct B { int i = ++U::x; };
template <True U> void f() { ++U::x; }
template <class U> void g() requires True<U> { ++U::x; }
template <class V> class C
{
static int x;
template <True U> friend struct B;
template <True U> friend void f();
template <class U> friend void g() requires True<U>;
};
int main()
{
f<C<int>>();
g<C<int>>();
B<C<int>>();
}
|