refactor: conversion from quantity to quantity_point is now explicit

This commit is contained in:
Mateusz Pusz committed 2023-05-24 22:42:11 +02:00
1 parent a3e5c84a47
commit 299032a7e8
3 files changed
+8 -8

No files matched your search

+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()