quantity_cast overloads
<mp-units/framework/quantity_cast.h>Explicit cast of a quantity type
template<
    QuantitySpec auto ToQS,
    typename FwdQ,
    Quantity Q = std::remove_cvref_t<FwdQ>>
requires (castable(Q::quantity_spec, ToQS)) && (MP_UNITS_WEAK_UNIT_OF(MP_UNITS_NONCONST_TYPE(Q::unit), ToQS))
[[nodiscard]]
constexpr
Quantity auto
quantity_cast(FwdQ&& q);
» more...
Explicit cast of a quantity point type
template<
    QuantitySpec auto ToQS,
    typename FwdQP,
    QuantityPoint QP = std::remove_cvref_t<FwdQP>>
requires (castable(QP::quantity_spec, ToQS)) && (MP_UNITS_WEAK_UNIT_OF(MP_UNITS_NONCONST_TYPE(QP::unit), ToQS))
[[nodiscard]]
constexpr
QuantityPoint auto
quantity_cast(FwdQP&& qp);
» more...
| Name | Description | 
|---|---|
| ToQS | a quantity specification to use for a target quantity |