quantity_cast<U, Rep> support added

This commit is contained in:
Mateusz Pusz
2019-09-16 00:21:58 -06:00
parent fc2b1add84
commit 90a7dbe3fa
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -135,6 +135,13 @@ namespace std::experimental::units {
return cast::cast(q);
}
template<Unit ToU, Scalar ToRep = double, typename U, typename Rep>
constexpr quantity<ToU, ToRep> quantity_cast(const quantity<U, Rep>& q)
{
return quantity_cast<quantity<ToU, ToRep>>(q);
}
// quantity_values
template<Scalar Rep>