prog.cpp:9:63: warning: friend declaration 'std::ostream& operator<<(std::ostream&, const Foo<T>&)' declares a non-template function [-Wnon-template-friend]
friend ostream& operator<<(ostream &output, const Foo& rhs);
^
prog.cpp:9:63: note: (if this is not what you intended, make sure the function template has already been declared and add <> after the function name here)
/home/3GzhQ0/ccH29znL.o: In function `main':
prog.cpp:(.text.startup+0x1b): undefined reference to `operator<<(std::ostream&, Foo<int> const&)'
collect2: error: ld returned 1 exit status