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

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;utility&sol;safe&lowbar;int&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename From,
    typename To&gt;
inline constexpr bool is&lowbar;value&lowbar;preserving&lowbar;v = &lsqb;&rsqb; &lcub;
  if constexpr (integral&lt;underlying&lowbar;int&lowbar;type&lowbar;t&lt;From&gt;&gt; &amp;&amp; integral&lt;underlying&lowbar;int&lowbar;type&lowbar;t&lt;To&gt;&gt;)
    return is&lowbar;value&lowbar;preserving&lowbar;int&lowbar;v&lt;From, To&gt;&semi;
  else
    return false&semi;
&rcub;();
----


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