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

Constructors

== Synopses

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

Default constructor


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
xref:mp_units/utility/safe_int-07/2constructor-01.adoc[safe&lowbar;int]() = default;
----

[.small]#xref:mp_units/utility/safe_int-07/2constructor-01.adoc[_» more&period;&period;&period;_]#

Construct from `safe&lowbar;int`


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;&sol;&ast; implementation-defined &ast;&sol; U&gt;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
explicit(!detail&colon;&colon;is&lowbar;value&lowbar;preserving&lowbar;int&lowbar;v&lt;U, T&gt;)
xref:mp_units/utility/safe_int-07/2constructor-06.adoc[safe&lowbar;int](xref:mp_units/utility/safe_int-07.adoc[safe&lowbar;int&lt;U, ErrorPolicy&gt;] other);
----

[.small]#xref:mp_units/utility/safe_int-07/2constructor-06.adoc[_» more&period;&period;&period;_]#

Construct from `U`


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename U&gt;
requires (!treat&lowbar;as&lowbar;floating&lowbar;point&lt;std&colon;&colon;remove&lowbar;cvref&lowbar;t&lt;U&gt;&gt;) &amp;&amp; std&colon;&colon;is&lowbar;constructible&lowbar;v&lt;T, U&gt;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
explicit(!detail&colon;&colon;is&lowbar;value&lowbar;preserving&lowbar;v&lt;std&colon;&colon;remove&lowbar;cvref&lowbar;t&lt;U&gt;, T&gt; &verbar;&verbar; !std&colon;&colon;convertible&lowbar;to&lt;U, T&gt;)
xref:mp_units/utility/safe_int-07/2constructor-0b.adoc[safe&lowbar;int](U const& v);
----

[.small]#xref:mp_units/utility/safe_int-07/2constructor-0b.adoc[_» more&period;&period;&period;_]#


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