From e077e0c72b4dba1f1321024602747fe4f61d443e Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Fri, 11 May 2001 14:15:33 +0000 Subject: [PATCH] * comparison operators should return const relationals. --- ginac/operators.cpp | 12 ++++++------ ginac/operators.h | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ginac/operators.cpp b/ginac/operators.cpp index 3a4229ba..00c33a73 100644 --- a/ginac/operators.cpp +++ b/ginac/operators.cpp @@ -271,37 +271,37 @@ const numeric operator--(numeric & lh, int) // binary relational operators ex with ex -relational operator==(const ex & lh, const ex & rh) +const relational operator==(const ex & lh, const ex & rh) { debugmsg("operator==(ex,ex)",LOGLEVEL_OPERATOR); return relational(lh,rh,relational::equal); } -relational operator!=(const ex & lh, const ex & rh) +const relational operator!=(const ex & lh, const ex & rh) { debugmsg("operator!=(ex,ex)",LOGLEVEL_OPERATOR); return relational(lh,rh,relational::not_equal); } -relational operator<(const ex & lh, const ex & rh) +const relational operator<(const ex & lh, const ex & rh) { debugmsg("operator<(ex,ex)",LOGLEVEL_OPERATOR); return relational(lh,rh,relational::less); } -relational operator<=(const ex & lh, const ex & rh) +const relational operator<=(const ex & lh, const ex & rh) { debugmsg("operator<=(ex,ex)",LOGLEVEL_OPERATOR); return relational(lh,rh,relational::less_or_equal); } -relational operator>(const ex & lh, const ex & rh) +const relational operator>(const ex & lh, const ex & rh) { debugmsg("operator>(ex,ex)",LOGLEVEL_OPERATOR); return relational(lh,rh,relational::greater); } -relational operator>=(const ex & lh, const ex & rh) +const relational operator>=(const ex & lh, const ex & rh) { debugmsg("operator>=(ex,ex)",LOGLEVEL_OPERATOR); return relational(lh,rh,relational::greater_or_equal); diff --git a/ginac/operators.h b/ginac/operators.h index b84d38b6..22d89370 100644 --- a/ginac/operators.h +++ b/ginac/operators.h @@ -74,12 +74,12 @@ const numeric operator++(numeric & lh, int); const numeric operator--(numeric & lh, int); // binary relational operators ex with ex -relational operator==(const ex & lh, const ex & rh); -relational operator!=(const ex & lh, const ex & rh); -relational operator<(const ex & lh, const ex & rh); -relational operator<=(const ex & lh, const ex & rh); -relational operator>(const ex & lh, const ex & rh); -relational operator>=(const ex & lh, const ex & rh); +const relational operator==(const ex & lh, const ex & rh); +const relational operator!=(const ex & lh, const ex & rh); +const relational operator<(const ex & lh, const ex & rh); +const relational operator<=(const ex & lh, const ex & rh); +const relational operator>(const ex & lh, const ex & rh); +const relational operator>=(const ex & lh, const ex & rh); // input/output stream operators std::ostream & operator<<(std::ostream & os, const ex & e); -- 2.44.0