Commit 038f86ad authored by Kenton Varda's avatar Kenton Varda

Fix Quantity % Quantity return type -- should be a Quantity, not a regular number.

parent 2b8cde72
......@@ -264,9 +264,9 @@ public:
return value / other.value;
}
template <typename OtherNumber>
inline constexpr decltype(Number(1) % OtherNumber(1))
inline constexpr Quantity<decltype(Number(1) % OtherNumber(1)), Unit>
operator%(const Quantity<OtherNumber, Unit>& other) const {
return value % other.value;
return Quantity<decltype(Number(1) % OtherNumber(1)), Unit>(value % other.value);
}
template <typename OtherNumber, typename OtherUnit>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment