quantity_cast<U, Rep> support added

This commit is contained in:
Mateusz Pusz committed 2019-09-16 00:21:58 -06:00
1 parent fc2b1add84
commit 90a7dbe3fa
2 files changed
+8 -1

No files matched your search

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