[#mp_units-quantity-01-force_numerical_value_in] = xref:mp_units.adoc[mp_units]::xref:mp_units/quantity-01.adoc[quantity]::force_numerical_value_in :relfileprefix: ../../ :mrdocs: Deprecated. Returns the numerical value converted to another unit, truncating if inexact. == Synopsis Declared in `<mp‐units/framework/quantity.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<xref:mp_units/UnitOf.adoc[UnitOf<quantity_spec>] U> requires detail::ExplicitlyCastable<unit, U{}, rep> [[deprecated("2.6.0: use `numerical_value_in(unit, policy)` with a rounding policy (e.g. `truncated`) instead"), nodiscard]] constexpr xref:mp_units/RepresentationOf.adoc[RepresentationOf<quantity_spec>] auto force_numerical_value_in(U u) const noexcept; ---- [WARNING] ==== https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]: 2.6.0: use `numerical_value_in(unit, policy)` with a rounding policy (e.g. `truncated`) instead. Use of this entity is allowed but discouraged. ==== == Return Value The numerical value expressed in `u`. [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *u* | the target unit |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#