0

I am writing a class representing a Matrix and encountered an error: "expected ‘)’ before ‘<’ token" on the second to last line.

template<typename T>
class Matrix;

template<typename T>
Matrix<T> operator-(const Matrix<T> &self);

template<typename T>
ostream & operator<<(ostream &out, const Matrix<T> &matrix);

template<typename T> class Matrix
{
public:
    friend ostream & (operator<<<> )(ostream &out, const Matrix &matrix);

    friend Matrix (operator-<>)(const Matrix &self); //error here
};
rozi
  • 156
  • 3

1 Answers1

1

Must have been a bug with eclipse using Linux GCC. Solved it by compiling with a different compiler.

rozi
  • 156
  • 3