[#mp_units-safe_int-09-2constructor-00]
= xref:mp_units.adoc[mp&lowbar;units]::xref:mp_units/safe_int-09.adoc[safe&lowbar;int]::safe&lowbar;int
:relfileprefix: ../../
:mrdocs:

Construct from `safe&lowbar;int`

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;std::integral U&gt;
requires (!std&colon;&colon;is&lowbar;same&lowbar;v&lt;T, U&gt;) &amp;&amp; std&colon;&colon;is&lowbar;constructible&lowbar;v&lt;T, U&gt;
constexpr
explicit(!detail&colon;&colon;is&lowbar;value&lowbar;preserving&lowbar;int&lowbar;v&lt;U, T&gt;)
safe&lowbar;int(xref:mp_units/safe_int-09.adoc[safe&lowbar;int&lt;U, ErrorPolicy&gt;] const& other);
----

== Parameters

[cols="1,4"]
|===
|Name|Description

| *other*
| The object to copy construct from
|===


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