[#mp_units-quantity_cast-0f] = xref:mp_units.adoc[mp_units]::quantity_cast :relfileprefix: ../ :mrdocs: `quantity_cast` overloads == Synopses Declared in `<mp‐units/framework/quantity_cast.h>` Explicit cast of a quantity type [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< xref:mp_units/QuantitySpec.adoc[QuantitySpec] auto ToQS, typename FwdQ, xref:mp_units/Quantity.adoc[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 xref:mp_units/Quantity.adoc[Quantity] auto xref:mp_units/quantity_cast-0b.adoc[quantity_cast](FwdQ&& q); ---- [.small]#xref:mp_units/quantity_cast-0b.adoc[_» more..._]# Explicit cast of a quantity point type [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< xref:mp_units/QuantitySpec.adoc[QuantitySpec] auto ToQS, typename FwdQP, xref:mp_units/QuantityPoint.adoc[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 xref:mp_units/QuantityPoint.adoc[QuantityPoint] auto xref:mp_units/quantity_cast-05.adoc[quantity_cast](FwdQP&& qp); ---- [.small]#xref:mp_units/quantity_cast-05.adoc[_» more..._]# == Template Parameters [cols=2] |=== | Name | Description | *ToQS* | a quantity specification to use for a target quantity |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#