tags 386099 + patch
thankyou
Hi,
this patch removes the definition of those operators for the included Integer
and
Rational classes.
Regards,
Jan
diff -aur magnus-20060324.ORIG/back_end/libg++/include/Integer.h magnus-20060324/back_end/libg++/include/Integer.h
--- magnus-20060324.ORIG/back_end/libg++/include/Integer.h 2005-01-07 01:28:20.0 +0100
+++ magnus-20060324/back_end/libg++/include/Integer.h 2007-06-29 01:20:11.0 +0200
@@ -128,11 +128,6 @@
// (constructive binary operations are inlined below)
-#if defined (__GNUG__) && ! defined (__STRICT_ANSI__)
- friend Integer operator ? (const Integer& x, const Integer& y); // max
-#endif
-
// builtin Integer functions that must be friends
friend long lg (const Integer&); // floor log base 2 of abs(x)
@@ -688,18 +683,6 @@
return *this;
}
-#if defined (__GNUG__) && ! defined (__STRICT_ANSI__)
-inline Integer operator ? (const Integer& x, const Integer& y)
-{
- return (compare(x.rep, y.rep) >= 0)? x : y;
-}
-#endif
-
inline void Integer::abs()
{
diff -aur magnus-20060324.ORIG/back_end/libg++/include/Rational.h magnus-20060324/back_end/libg++/include/Rational.h
--- magnus-20060324.ORIG/back_end/libg++/include/Rational.h 2005-01-07 01:28:20.0 +0100
+++ magnus-20060324/back_end/libg++/include/Rational.h 2007-06-29 01:20:25.0 +0200
@@ -71,11 +71,6 @@
Rational&operator *= (const Rational& y);
Rational&operator /= (const Rational& y);
-#if defined (__GNUG__) && ! defined (__STRICT_ANSI__)
- friend Rational operator ? (const Rational& x, const Rational& y); // max
-#endif
-
friend Rational operator - (const Rational& x);
@@ -230,18 +225,6 @@
inline const Integer& Rational::denominator() const { return den; }
inline Rational::operator double() const { return ratio(num, den); }
-#if defined (__GNUG__) && ! defined (__STRICT_ANSI__)
-inline Rational operator ? (const Rational& x, const Rational& y)
-{
- if (compare(x, y) >= 0) return x; else return y;
-}
-#endif
-
#if defined(__GNUG__) && !defined(_G_NO_NRV)
inline Rational operator + (const Rational& x, const Rational& y) return r
signature.asc
Description: Digital signature