From f33594a8527af147e987a742e18da6ddbf927f41 Mon Sep 17 00:00:00 2001 From: namark <namark@disroot.org> Date: Mon, 19 Jul 2021 19:49:36 +0400 Subject: [PATCH] That's not where those keywords go -_- --- unit_tests/algorithm.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unit_tests/algorithm.cpp b/unit_tests/algorithm.cpp index cfebf5d..0925bdc 100644 --- a/unit_tests/algorithm.cpp +++ b/unit_tests/algorithm.cpp @@ -147,13 +147,13 @@ struct rational { return num * other.den == other.num * den; } constexpr - rational operator+() { return *this; } const - constexpr + rational operator+() const { return *this; } + constexpr rational operator*(const rational& other) const { return {num*other.num, den*other.den}; } - constexpr + constexpr void normalize() { auto gcd = std::gcd(num, den); -- GitLab