feat: numerical_value_ref_in disallowed for rvalues

This commit is contained in:
Mateusz Pusz
2023-09-13 19:59:49 +02:00
parent 6a1e600f65
commit 2e26eed59d
11 changed files with 254 additions and 297 deletions

View File

@@ -82,7 +82,7 @@ template<ReferenceOf<currency> auto To, ReferenceOf<currency> auto From, auto PO
quantity_point<To, PO, Rep> exchange_to(quantity_point<From, PO, Rep> q)
{
return quantity_point{zero + static_cast<Rep>(exchange_rate<q.unit, get_unit(To)>() *
(q - q.absolute_point_origin).numerical_value_ref_in(q.unit)) *
(q - q.absolute_point_origin).numerical_value_in(q.unit)) *
To};
}