Debian Codegraph @

gcc/testsuite/g++.dg/template/friend68.C

raw
1 // { dg-do compile }
2
3 template <class>
4 struct S {
5 S();
6 friend int f(S x) { return x.i + x.j; }
7 template <class T>
8 friend int g(S x, T) { return x.i + x.j; }
9 private:
10 int i;
11 protected:
12 int j;
13 };