Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/concepts-friend7.C

raw
1 // PR c++/93467
2 // { dg-do compile { target c++20 } }
3
4 template<typename T> concept True = true;
5
6 template<typename U>
7 struct S1 {
8 template<True T> friend struct S2; // friend declaration for S2
9 };
10
11 S1<int> s; // instantiate S1
12
13 template<True T> struct S2; // another declaration for S2
14
15 template<typename U>
16 struct S3 {
17 template<True T> friend struct ::S2; // a third declaration for S2
18 };