H
Helmut Jarausch
Hi,
could anybody please explain to me what's wrong with
the following code
template <typename INT,INT P> class Zp;
template <typename INT,INT P>
Zp<INT,P> operator-(const Zp<INT,P>& a, const Zp<INT,P>& b);
template <typename INT,INT P>
class Zp {
public:
Zp operator-() const; // that's the unary operator -
// vvvvvvvvvvvv this is binary operator -
friend Zp<INT,P> operator- <>(const Zp<INT,P>& a, const Zp<INT,P>& b);
// this produces
// error: declaration of 'operator-' as non-function
// error: expected ';' before '<' token
};
Many thanks for your help,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
could anybody please explain to me what's wrong with
the following code
template <typename INT,INT P> class Zp;
template <typename INT,INT P>
Zp<INT,P> operator-(const Zp<INT,P>& a, const Zp<INT,P>& b);
template <typename INT,INT P>
class Zp {
public:
Zp operator-() const; // that's the unary operator -
// vvvvvvvvvvvv this is binary operator -
friend Zp<INT,P> operator- <>(const Zp<INT,P>& a, const Zp<INT,P>& b);
// this produces
// error: declaration of 'operator-' as non-function
// error: expected ';' before '<' token
};
Many thanks for your help,
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany