diff --git a/boxedcpp/bootstrap.hpp b/boxedcpp/bootstrap.hpp index b4cc3d6..00357e2 100644 --- a/boxedcpp/bootstrap.hpp +++ b/boxedcpp/bootstrap.hpp @@ -78,11 +78,29 @@ bool greater_than_equals(P1 p1, P2 p2) } template -P1 ×equal(P1 &p1, P2 p2) +P1 ×equal(P1 &p1, const P2 &p2) { return (p1 *= p2); } +template +P1 ÷sequal(P1 &p1, const P2 &p2) +{ + return (p1 /= p2); +} + +template +P1 &addsequal(P1 &p1, const P2 &p2) +{ + return (p1 += p2); +} + +template +P1 &subtractsequal(P1 &p1, const P2 &p2) +{ + return (p1 -= p2); +} + //Add canonical forms of operators template void add_oper_equals(BoxedCPP_System &s) @@ -170,6 +188,9 @@ void add_opers_arithmetic_overload(BoxedCPP_System &s) register_function(s, ÷, "/"); register_function(s, &multiply, "*"); register_function(s, ×equal, "*="); + register_function(s, ÷sequal, "/="); + register_function(s, &subtractsequal, "-="); + register_function(s, &addsequal, "+="); } template