This repository was archived by the owner on Jan 30, 2023. It is now read-only.
File tree 4 files changed +10
-13
lines changed
4 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -677,19 +677,19 @@ std::ostream & operator<<(std::ostream & os, const exset & e);
677
677
std::ostream & operator <<(std::ostream & os, const exmap & e);
678
678
679
679
/* Function objects for STL sort() etc. */
680
- struct ex_is_less : public std ::binary_function<ex, ex, bool > {
680
+ struct ex_is_less {
681
681
bool operator () (const ex &lh, const ex &rh) const { return lh.compare (rh) < 0 ; }
682
682
};
683
683
684
- struct ex_is_equal : public std ::binary_function<ex, ex, bool > {
684
+ struct ex_is_equal {
685
685
bool operator () (const ex &lh, const ex &rh) const { return lh.is_equal (rh); }
686
686
};
687
687
688
- struct op0_is_equal : public std ::binary_function<ex, ex, bool > {
688
+ struct op0_is_equal {
689
689
bool operator () (const ex &lh, const ex &rh) const { return lh.op (0 ).is_equal (rh.op (0 )); }
690
690
};
691
691
692
- struct ex_swap : public std ::binary_function<ex, ex, void > {
692
+ struct ex_swap {
693
693
void operator () (ex &lh, ex &rh) const { lh.swap (rh); }
694
694
};
695
695
Original file line number Diff line number Diff line change @@ -91,19 +91,19 @@ class expair
91
91
};
92
92
93
93
/* * 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 {
95
95
bool operator ()(const expair &lh, const expair &rh) const { return lh.is_less (rh); }
96
96
};
97
97
98
98
/* * Function object not caring about the numerical coefficients for insertion
99
99
* into third argument of STL's sort(). Note that this does not define a
100
100
* strict weak ordering since for any symbol x we have neither 3*x<2*x or
101
101
* 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 {
103
103
bool operator ()(const expair &lh, const expair &rh) const { return (lh.rest .compare (rh.rest )<0 ); }
104
104
};
105
105
106
- struct expair_swap : public std ::binary_function<expair, expair, void > {
106
+ struct expair_swap {
107
107
void operator ()(expair &lh, expair &rh) const { lh.swap (rh); }
108
108
};
109
109
Original file line number Diff line number Diff line change 35
35
36
36
namespace GiNaC {
37
37
38
- class print_order : public std ::binary_function<ex, ex, bool > {
38
+ class print_order {
39
39
private:
40
40
const tinfo_t & function_id () const ;
41
41
const tinfo_t & fderivative_id () const ;
@@ -96,9 +96,7 @@ class print_order_mul : public print_order {
96
96
97
97
// We have to define the following class to sort held expressions
98
98
// 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 {
102
100
public:
103
101
bool operator () (const expair &lh, const expair &rh) const ;
104
102
bool compare_degrees (const expair &lhex, const expair &rhex) const ;
Original file line number Diff line number Diff line change @@ -158,8 +158,7 @@ namespace std {
158
158
159
159
/* * Specialization of std::less for ptr<T> to enable ordering of ptr<T>
160
160
* 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> > {
163
162
bool operator ()(const GiNaC::ptr<T> &lhs, const GiNaC::ptr<T> &rhs) const
164
163
{
165
164
return less<T*>()(lhs.p , rhs.p );
You can’t perform that action at this time.
0 commit comments