Matt Fago <fago@xxxxxxxxxxxxx> writes: > It seemingly is related to friend injection (-ffriend-injection > eliminates the message). > > C.h: > --- > #include <iostream> > namespace A { > namespace B { > class C { > public: > friend std::ostream & operator<< ( std::ostream &os, C &in ); > }; > } > } This makes the function a friend but does not actually declare the function. That is what -ffriend-injection is about: in pre-ISO C++ a friend declaration served as a declaration, in ISO C++ it does not. If you want to declare the function, declare it. Don't just mention it in a friend declaration. Ian