mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 20:54:28 +02:00
Quantity cast for dimension now uses dimension's coherent unit
This commit is contained in:
@@ -144,7 +144,7 @@ template<Dimension ToD, typename D, typename U, typename Rep>
|
|||||||
[[nodiscard]] constexpr auto quantity_cast(const quantity<D, U, Rep>& q)
|
[[nodiscard]] constexpr auto quantity_cast(const quantity<D, U, Rep>& q)
|
||||||
requires equivalent_dim<ToD, D>
|
requires equivalent_dim<ToD, D>
|
||||||
{
|
{
|
||||||
return quantity_cast<quantity<ToD, U, Rep>>(q);
|
return quantity_cast<quantity<ToD, dimension_unit<ToD>, Rep>>(q);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user