[#mp_units-operator_minus-0c5]
= xref:mp_units.adoc[mp&lowbar;units]::operator&hyphen;
:relfileprefix: ../
:mrdocs:

Unary minus operators

== Synopses

Declared in `&lt;mp&hyphen;units&sol;constrained&period;h&gt;`

Unary minus operator


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/constrained.adoc[constrained&lt;decltype(&hyphen;std&colon;&colon;declval&lt;T&gt;()), ErrorPolicy&gt;]
xref:mp_units/operator_minus-0e.adoc[operator&hyphen;](xref:mp_units/constrained.adoc[constrained] const& x);
----

[.small]#xref:mp_units/operator_minus-0e.adoc[_» more&period;&period;&period;_]#

Subtraction operator


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/safe_int-09.adoc[safe&lowbar;int&lt;&sol;&ast; implementation-defined &ast;&sol;, ErrorPolicy&gt;]
xref:mp_units/operator_minus-01.adoc[operator&hyphen;](
    U lhs,
    xref:mp_units/safe_int-09.adoc[safe&lowbar;int] rhs);
----

[.small]#xref:mp_units/operator_minus-01.adoc[_» more&period;&period;&period;_]#


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
auto
xref:mp_units/operator_minus-0f.adoc[operator&hyphen;](
    U lhs,
    xref:mp_units/safe_int-09.adoc[safe&lowbar;int] rhs)
requires requires &lcub; lhs &hyphen; static&lowbar;cast&lt;U&gt;(rhs&period;value&lowbar;)&semi; &rcub;;
----

[.small]#xref:mp_units/operator_minus-0f.adoc[_» more&period;&period;&period;_]#

Subtraction operator


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/safe_int-09.adoc[safe&lowbar;int&lt;&sol;&ast; implementation-defined &ast;&sol;, ErrorPolicy&gt;]
xref:mp_units/operator_minus-07.adoc[operator&hyphen;](
    xref:mp_units/safe_int-09.adoc[safe&lowbar;int] lhs,
    U rhs);
----

[.small]#xref:mp_units/operator_minus-07.adoc[_» more&period;&period;&period;_]#


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
auto
xref:mp_units/operator_minus-0ca.adoc[operator&hyphen;](
    xref:mp_units/safe_int-09.adoc[safe&lowbar;int] lhs,
    U rhs)
requires requires &lcub; static&lowbar;cast&lt;U&gt;(lhs&period;value&lowbar;) &hyphen; rhs&semi; &rcub;;
----

[.small]#xref:mp_units/operator_minus-0ca.adoc[_» more&period;&period;&period;_]#

Subtraction operator


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/safe_int-09.adoc[safe&lowbar;int&lt;&sol;&ast; implementation-defined &ast;&sol;, ErrorPolicy&gt;]
xref:mp_units/operator_minus-00.adoc[operator&hyphen;](
    xref:mp_units/safe_int-09.adoc[safe&lowbar;int] lhs,
    xref:mp_units/safe_int-09.adoc[safe&lowbar;int] rhs);
----

[.small]#xref:mp_units/operator_minus-00.adoc[_» more&period;&period;&period;_]#

Subtraction operator


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/safe_int-09.adoc[safe&lowbar;int&lt;&sol;&ast; implementation-defined &ast;&sol;, ErrorPolicy&gt;]
xref:mp_units/operator_minus-04.adoc[operator&hyphen;](
    xref:mp_units/safe_int-09.adoc[safe&lowbar;int] lhs,
    xref:mp_units/constrained.adoc[constrained&lt;U, CP&gt;] rhs);
----

[.small]#xref:mp_units/operator_minus-04.adoc[_» more&period;&period;&period;_]#

Subtraction operator


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/constrained.adoc[constrained&lt;decltype(std&colon;&colon;declval&lt;T&gt;() &hyphen; std&colon;&colon;declval&lt;U&gt;()), CP&gt;]
xref:mp_units/operator_minus-05.adoc[operator&hyphen;](
    xref:mp_units/safe_int-09.adoc[safe&lowbar;int] lhs,
    xref:mp_units/constrained.adoc[constrained&lt;U, CP&gt;] const& rhs);
----

[.small]#xref:mp_units/operator_minus-05.adoc[_» more&period;&period;&period;_]#

Subtraction operator


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/safe_int-09.adoc[safe&lowbar;int&lt;&sol;&ast; implementation-defined &ast;&sol;, ErrorPolicy&gt;]
xref:mp_units/operator_minus-09.adoc[operator&hyphen;](
    xref:mp_units/constrained.adoc[constrained&lt;U, CP&gt;] lhs,
    xref:mp_units/safe_int-09.adoc[safe&lowbar;int] rhs);
----

[.small]#xref:mp_units/operator_minus-09.adoc[_» more&period;&period;&period;_]#

Subtraction operator


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/constrained.adoc[constrained&lt;decltype(std&colon;&colon;declval&lt;U&gt;() &hyphen; std&colon;&colon;declval&lt;T&gt;()), CP&gt;]
xref:mp_units/operator_minus-06.adoc[operator&hyphen;](
    xref:mp_units/constrained.adoc[constrained&lt;U, CP&gt;] const& lhs,
    xref:mp_units/safe_int-09.adoc[safe&lowbar;int] rhs);
----

[.small]#xref:mp_units/operator_minus-06.adoc[_» more&period;&period;&period;_]#


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