refactor: the rest of the code refactored for new quantity construction way

This commit is contained in:
Mateusz Pusz committed 2023-02-10 17:20:48 -08:00
1 parent a56696ee74
commit 9436229ed2
6 files changed
+115 -113

No files matched your search

+4 -4
View File
@@ -336,7 +336,7 @@ public:
requires detail::InvokeResultOf<quantity_spec.character, std::plus<>, rep, Value>;
}
{
return ::mp_units::quantity(lhs.number() + rhs);
return (lhs.number() + rhs) * R;
}
template<typename Value>
@@ -347,7 +347,7 @@ public:
requires detail::InvokeResultOf<quantity_spec.character, std::plus<>, Value, rep>;
}
{
return ::mp_units::quantity(lhs + rhs.number());
return (lhs + rhs.number()) * R;
}
template<typename Value>
@@ -358,7 +358,7 @@ public:
requires detail::InvokeResultOf<quantity_spec.character, std::minus<>, rep, Value>;
}
{
return ::mp_units::quantity(lhs.number() - rhs);
return (lhs.number() - rhs) * R;
}
template<typename Value>
@@ -369,7 +369,7 @@ public:
requires detail::InvokeResultOf<quantity_spec.character, std::minus<>, Value, rep>;
}
{
return ::mp_units::quantity(lhs - rhs.number());
return (lhs - rhs.number()) * R;
}
template<Representation Value>