refactor: conversion from quantity to quantity_point is now explicit

This commit is contained in:
Mateusz Pusz
2023-05-24 22:42:11 +02:00
parent a3e5c84a47
commit 299032a7e8
3 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ quantity<To, Rep> exchange_to(quantity<From, Rep> q)
template<ReferenceOf<currency> auto To, ReferenceOf<currency> auto From, auto PO, typename Rep>
quantity_point<To, PO, Rep> exchange_to(quantity_point<From, PO, Rep> q)
{
return static_cast<Rep>(exchange_rate<q.unit, get_unit(To)>() * q.absolute().number()) * To;
return quantity_point{static_cast<Rep>(exchange_rate<q.unit, get_unit(To)>() * q.absolute().number()) * To};
}
int main()