[#mp_units-is_value_preserving]
= xref:mp_units.adoc[mp&lowbar;units]::is&lowbar;value&lowbar;preserving
:relfileprefix: ../
:mrdocs:

Specifies if a specific conversion between two types is representable without data loss

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;framework&sol;customization&lowbar;points&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated(&quot;2&period;6&period;0&colon; Use &grave;mp&lowbar;units&colon;&colon;implicitly&lowbar;scalable&grave; instead&quot;)&rsqb;&rsqb;
template&lt;
    typename From,
    typename To&gt;
constexpr bool is&lowbar;value&lowbar;preserving = treat&lowbar;as&lowbar;floating&lowbar;point&lt;To&gt; &verbar;&verbar; !treat&lowbar;as&lowbar;floating&lowbar;point&lt;From&gt;;
----

[WARNING]
====
https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]: 2&period;6&period;0&colon; Use &grave;mp&lowbar;units&colon;&colon;implicitly&lowbar;scalable&grave; instead. Use of this entity is allowed but discouraged.
====
== Template Parameters

[cols="1,4"]
|===
| Name| Description
| *From*
| a source representation type
| *To*
| a destination representation type
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
