From d2010760ed2a5fb566b83e4d59df01d5a6e2f899 Mon Sep 17 00:00:00 2001 From: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Mon, 2 May 2022 14:38:29 -0700 Subject: [PATCH] rational: restored ostream operator --- app/common/rational.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/common/rational.h b/app/common/rational.h index 73c839c81..4701e1e0a 100644 --- a/app/common/rational.h +++ b/app/common/rational.h @@ -25,6 +25,7 @@ extern "C" { #include } +#include #include #include @@ -127,6 +128,13 @@ public: QString toString() const; + friend std::ostream& operator<<(std::ostream &out, const rational &value) + { + out << value.r_.num << '/' << value.r_.den; + + return out; + } + private: void FixSigns(); void Reduce();