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

Constructors

== Synopses

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

Default constructor


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:mp_units/safe_int-09/2constructor-0d.adoc[safe&lowbar;int]() = default;
----

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

Construct from `safe&lowbar;int`


[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;)
xref:mp_units/safe_int-09/2constructor-00.adoc[safe&lowbar;int](xref:mp_units/safe_int-09.adoc[safe&lowbar;int&lt;U, ErrorPolicy&gt;] const& other);
----

[.small]#xref:mp_units/safe_int-09/2constructor-00.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;
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;)
xref:mp_units/safe_int-09/2constructor-0b.adoc[safe&lowbar;int](U const& v);
----

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


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