Overloading operator
The problem is that the compiler is not trying to use the templated operator<< you provided, but rather a non-templated version. When you declare a friend inside a class you are injecting the declaration of that function in the enclosing scope. The following code has the effect of declaring (and not defining) a free function … Read more