// PR c++/34870 template struct Foo { friend void func(const Foo &) {} }; void check(const Foo & x) { func(x); }