Friend function: Difference between revisions

Content deleted Content added
"::show()" means qualified name, and that's why according to standard the lookup must not search the implementation above, and that's why clang fail with this example, while g++ not (misbehaviour)
m Remove extra space:"friend void show(" -> "friend void show("
Line 32:
public:
Foo(): b(6) {}
friend void show(Bar& x, Foo& y); // declaration of global friend
friend void Bar::show(Bar& x, Foo& y); // declaration of friend from other class
};