Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 0dc211b

Browse files
committed
Removin binary_function from ginac code
1 parent 627b2bd commit 0dc211b

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

src/sage/symbolic/ginac/ex.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -677,19 +677,19 @@ std::ostream & operator<<(std::ostream & os, const exset & e);
677677
std::ostream & operator<<(std::ostream & os, const exmap & e);
678678

679679
/* Function objects for STL sort() etc. */
680-
struct ex_is_less : public std::binary_function<ex, ex, bool> {
680+
struct ex_is_less {
681681
bool operator() (const ex &lh, const ex &rh) const { return lh.compare(rh) < 0; }
682682
};
683683

684-
struct ex_is_equal : public std::binary_function<ex, ex, bool> {
684+
struct ex_is_equal {
685685
bool operator() (const ex &lh, const ex &rh) const { return lh.is_equal(rh); }
686686
};
687687

688-
struct op0_is_equal : public std::binary_function<ex, ex, bool> {
688+
struct op0_is_equal {
689689
bool operator() (const ex &lh, const ex &rh) const { return lh.op(0).is_equal(rh.op(0)); }
690690
};
691691

692-
struct ex_swap : public std::binary_function<ex, ex, void> {
692+
struct ex_swap {
693693
void operator() (ex &lh, ex &rh) const { lh.swap(rh); }
694694
};
695695

src/sage/symbolic/ginac/expair.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,19 +91,19 @@ class expair
9191
};
9292

9393
/** Function object for insertion into third argument of STL's sort() etc. */
94-
struct expair_is_less : public std::binary_function<expair, expair, bool> {
94+
struct expair_is_less {
9595
bool operator()(const expair &lh, const expair &rh) const { return lh.is_less(rh); }
9696
};
9797

9898
/** Function object not caring about the numerical coefficients for insertion
9999
* into third argument of STL's sort(). Note that this does not define a
100100
* strict weak ordering since for any symbol x we have neither 3*x<2*x or
101101
* 2*x<3*x. Handle with care! */
102-
struct expair_rest_is_less : public std::binary_function<expair, expair, bool> {
102+
struct expair_rest_is_less {
103103
bool operator()(const expair &lh, const expair &rh) const { return (lh.rest.compare(rh.rest)<0); }
104104
};
105105

106-
struct expair_swap : public std::binary_function<expair, expair, void> {
106+
struct expair_swap {
107107
void operator()(expair &lh, expair &rh) const { lh.swap(rh); }
108108
};
109109

src/sage/symbolic/ginac/order.h

+2-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
namespace GiNaC {
3737

38-
class print_order : public std::binary_function<ex, ex, bool> {
38+
class print_order {
3939
private:
4040
const tinfo_t& function_id() const;
4141
const tinfo_t& fderivative_id() const;
@@ -96,9 +96,7 @@ class print_order_mul : public print_order {
9696

9797
// We have to define the following class to sort held expressions
9898
// E.g. 3*x+2*x which does not get simplified to 5*x.
99-
class print_order_pair :
100-
public std::binary_function<expair, expair, bool>
101-
{
99+
class print_order_pair {
102100
public:
103101
bool operator() (const expair &lh, const expair &rh) const;
104102
bool compare_degrees(const expair &lhex, const expair &rhex) const;

src/sage/symbolic/ginac/ptr.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ namespace std {
158158

159159
/** Specialization of std::less for ptr<T> to enable ordering of ptr<T>
160160
* objects (e.g. for the use as std::map keys). */
161-
template <class T> struct less< GiNaC::ptr<T> >
162-
: public binary_function<GiNaC::ptr<T>, GiNaC::ptr<T>, bool> {
161+
template <class T> struct less< GiNaC::ptr<T> > {
163162
bool operator()(const GiNaC::ptr<T> &lhs, const GiNaC::ptr<T> &rhs) const
164163
{
165164
return less<T*>()(lhs.p, rhs.p);

0 commit comments

Comments
 (0)