[#mp_units-implicitly_scalable] = xref:mp_units.adoc[mp_units]::implicitly_scalable :relfileprefix: ../ :mrdocs: Controls whether conversion from `quantity<FromUnit, FromRep>` to `quantity<ToUnit, ToRep>` is implicit or explicit. == Synopsis Declared in `<mp‐units/framework/value_cast.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< auto FromUnit, typename FromRep, auto ToUnit, typename ToRep> constexpr bool implicitly_scalable = std::is_convertible_v<FromRep, ToRep> && (treat_as_floating_point<ToRep> || (!treat_as_floating_point<FromRep> && is_integral_scaling(FromUnit, ToUnit))); ---- == Description The default is `true` iff `FromRep` is convertible to `ToRep` and the scaling is non‐truncating: either `ToRep` is floating‐point, or both reps are non‐floating‐point and the unit magnitude ratio is an integral factor. Specialize this variable template to customize the implicit/explicit decision for your own representation types. == Template Parameters [cols="1,4"] |=== |Name|Description | *FromUnit* | the source unit value (NTTP) | *FromRep* | the source representation type | *ToUnit* | the target unit value (NTTP) | *ToRep* | the target representation type |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#