[#mp_units-quantity-01-force_in-02] = xref:mp_units.adoc[mp_units]::xref:mp_units/quantity-01.adoc[quantity]::force_in :relfileprefix: ../../ :mrdocs: `force_in` overloads == Synopses Declared in `<mp‐units/framework/quantity.h>` Deprecated. Returns this quantity re‐expressed with another representation type, truncating if inexact. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<xref:mp_units/RepresentationOf.adoc[RepresentationOf<quantity_spec>] ToRep> requires std::constructible_from<ToRep, rep> [[deprecated("2.6.0: use `in<Rep>(policy)` with a rounding policy (e.g. `truncated`) instead"), nodiscard]] constexpr xref:mp_units/QuantityOf.adoc[QuantityOf<quantity_spec>] auto xref:mp_units/quantity-01/force_in-05.adoc[force_in]() const; ---- [.small]#xref:mp_units/quantity-01/force_in-05.adoc[_» more..._]# Deprecated. Returns this quantity re‐expressed in another unit, truncating if inexact. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<xref:mp_units/UnitOf.adoc[UnitOf<quantity_spec>] ToU> requires detail::ExplicitlyCastable<unit, ToU{}, rep> [[deprecated("2.6.0: use `in(unit, policy)` with a rounding policy (e.g. `truncated`) instead"), nodiscard]] constexpr xref:mp_units/QuantityOf.adoc[QuantityOf<quantity_spec>] auto xref:mp_units/quantity-01/force_in-0d2.adoc[force_in](ToU to_u) const; ---- [.small]#xref:mp_units/quantity-01/force_in-0d2.adoc[_» more..._]# Deprecated. Returns this quantity re‐expressed in another unit and representation type, truncating if inexact. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< xref:mp_units/RepresentationOf.adoc[RepresentationOf<quantity_spec>] ToRep, xref:mp_units/UnitOf.adoc[UnitOf<quantity_spec>] ToU> requires std::constructible_from<ToRep, rep> && detail::ExplicitlyCastable<unit, ToU{}, rep> [[deprecated("2.6.0: use `in<Rep>(unit, policy)` with a rounding policy (e.g. `truncated`) instead"), nodiscard]] constexpr xref:mp_units/QuantityOf.adoc[QuantityOf<quantity_spec>] auto xref:mp_units/quantity-01/force_in-0d8.adoc[force_in](ToU to_u) const; ---- [.small]#xref:mp_units/quantity-01/force_in-0d8.adoc[_» more..._]# [WARNING] ==== https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged. ==== == Return Value * The equivalent quantity with representation type `ToRep`. * The equivalent quantity expressed in `to_u`. * The equivalent quantity expressed in `to_u` with representation type `ToRep`. [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *to_u* | the target unit |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#