Work around a limitation of the Python binding generator related to the += family of operators.
This commit is contained in:
parent
8df7c5fb7e
commit
2730ac9c8f
1 changed files with 5 additions and 5 deletions
|
|
@ -114,11 +114,11 @@ public:
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
// +=,-=... are member fns
|
// +=,-=... are member fns
|
||||||
void operator+=(const Op& o){ i+=o.i;}
|
Op &operator+=(const Op& o){ i+=o.i; return *this; }
|
||||||
void operator-=(const Op& o){ i-=o.i;}
|
Op &operator-=(const Op& o){ i-=o.i; return *this; }
|
||||||
void operator*=(const Op& o){ i*=o.i;}
|
Op &operator*=(const Op& o){ i*=o.i; return *this; }
|
||||||
void operator/=(const Op& o){ i/=o.i;}
|
Op &operator/=(const Op& o){ i/=o.i; return *this; }
|
||||||
void operator%=(const Op& o){ i%=o.i;}
|
Op &operator%=(const Op& o){ i%=o.i; return *this; }
|
||||||
// the +,-,*,... are friends
|
// the +,-,*,... are friends
|
||||||
// (just to make life harder)
|
// (just to make life harder)
|
||||||
friend Op operator+(const Op& a,const Op& b){return Op(a.i+b.i);}
|
friend Op operator+(const Op& a,const Op& b){return Op(a.i+b.i);}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue