[#mp_units-value_cast-05] = xref:mp_units.adoc[mp_units]::value_cast :relfileprefix: ../ :mrdocs: == Synopsis Declared in `<mp‐units/framework/value_cast.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename ToRep, xref:mp_units/Unit.adoc[Unit] auto ToU, typename FwdQP, xref:mp_units/QuantityPoint.adoc[QuantityPoint] QP = std::remove_cvref_t<FwdQP>> requires (MP_UNITS_WEAK_UNIT_OF(MP_UNITS_REMOVE_CONST(decltype(ToU)), QP::quantity_spec)) && RepresentationOf<ToRep, QP::quantity_spec> && std::constructible_from<ToRep, typename QP::rep> && detail::SaneScaling<QP::unit, ToU, ToRep> [[nodiscard]] constexpr xref:mp_units/QuantityPoint.adoc[QuantityPoint] auto value_cast(FwdQP&& qp); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#