[#mp_units-implicitly_scalable]
= xref:mp_units.adoc[mp&lowbar;units]::implicitly&lowbar;scalable
:relfileprefix: ../
:mrdocs:

Controls whether conversion from `quantity&lt;FromUnit, FromRep&gt;` to `quantity&lt;ToUnit, ToRep&gt;` is implicit or explicit&period;

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;framework&sol;value&lowbar;cast&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    auto FromUnit,
    typename FromRep,
    auto ToUnit,
    typename ToRep&gt;
constexpr bool implicitly&lowbar;scalable = std&colon;&colon;is&lowbar;convertible&lowbar;v&lt;FromRep, ToRep&gt; &amp;&amp;
  (treat&lowbar;as&lowbar;floating&lowbar;point&lt;ToRep&gt; &verbar;&verbar; (!treat&lowbar;as&lowbar;floating&lowbar;point&lt;FromRep&gt; &amp;&amp; is&lowbar;integral&lowbar;scaling(FromUnit, ToUnit)));
----

== Description

The default is `true` iff `FromRep` is convertible to `ToRep` and the scaling is non&hyphen;truncating&colon; either `ToRep` is floating&hyphen;point, or both reps are non&hyphen;floating&hyphen;point and the unit magnitude ratio is an integral factor&period;

Specialize this variable template to customize the implicit&sol;explicit decision for your own representation types&period;

== 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]#
