Debian Codegraph @

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

raw
1 // PR c++/122550
2 // { dg-do compile { target c++20 } }
3
4 template<typename U>
5 struct Hasher;
6
7 template <class a>
8 concept C = true;
9
10 template<C T>
11 void add(Hasher<int>&, T);
12
13 template<>
14 struct Hasher<int> {
15 template<C T>
16 friend void add(Hasher& hasher, T integer) {}
17 };
18
19 int main() {
20 Hasher<int> h;
21 add(h, 0);
22 }