3 template <typename INT,INT P> class Zp;
5 template <typename INT,INT P>
6 Zp<INT,P> operator-(const Zp<INT,P>& a, const Zp<INT,P>& b);
8 template <typename INT,INT P>
11 static const INT p = P;
16 Zp( INT x ) : val(x%p) { if (x < 0 ) x+= p; }
18 // this compiles only if the following definition is moved
19 // AFTER the friend declaration
20 Zp operator-() const { return Zp(p-val); }
21 friend Zp<INT,P> operator- <>(const Zp<INT,P>& a, const Zp<INT,P>& b); // { dg-error "declaration|expected" }