// How NOT TO DO IT

#include <iostream>
using namespace std;

template <typename T>
struct Foo
{
    friend ostream& operator<<(ostream &output, const Foo& rhs);

};

template <class T>
ostream& operator<<(ostream &output, const Foo<T>& rhs)
{
    return output; // don't do anything
}

int main()
{
    Foo<int> foo;
    std::cout << foo << std::endl;
}