#include <iostream>
template <typename T> class Matrix;
template <typename T> std::ostream& operator<<(
std::ostream& ostr, const Matrix<T>& m);
template <typename T>
class Matrix {
private:
int _rank;
friend std::ostream& operator<< <> (
std::ostream& ostr, const Matrix& m );
};
template <typename T> std::ostream& operator<<(
std::ostream& ostr, const Matrix<T>& m )
{
(void) m._rank; // test friendship
return ostr;
}
void f(const Matrix<int>& m)
{
std::cout << m;
}