From: Richard Kreckel Date: Fri, 11 May 2001 14:15:33 +0000 (+0000) Subject: * comparison operators should return const relationals. X-Git-Tag: release_0-8-3~9 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=e077e0c72b4dba1f1321024602747fe4f61d443e * comparison operators should return const relationals. --- 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);