[#mp_units-operator_slash-0a]
= xref:mp_units.adoc[mp&lowbar;units]::operator&sol;
:relfileprefix: ../
:mrdocs:

Division operators

== Synopses

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

Divides a unit by a reference


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
consteval
&sol;&ast; implementation-defined &ast;&sol;
xref:mp_units/operator_slash-0d6.adoc[operator&sol;](
    U1 u1,
    xref:mp_units/reference-0b2.adoc[reference] r);
----

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

Divides a reference by a unit


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
consteval
&sol;&ast; implementation-defined &ast;&sol;
xref:mp_units/operator_slash-0e.adoc[operator&sol;](
    xref:mp_units/reference-0b2.adoc[reference] r,
    U2 u2);
----

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

Divides a reference by another reference


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
consteval
&sol;&ast; implementation-defined &ast;&sol;
xref:mp_units/operator_slash-0d3.adoc[operator&sol;](
    xref:mp_units/reference-0b2.adoc[reference] r1,
    xref:mp_units/reference-0b2.adoc[reference&lt;Q2, U2&gt;] r2);
----

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

Deleted overload rejecting `reference &sol; quantity`, which has no defined meaning


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    xref:mp_units/Reference-0ba.adoc[Reference] R,
    typename Q&gt;
requires Quantity&lt;std&colon;&colon;remove&lowbar;cvref&lowbar;t&lt;Q&gt;&gt;
constexpr
auto
xref:mp_units/operator_slash-01.adoc[operator&sol;](
    R r,
    Q&& q) = delete;
----

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

Deleted overload rejecting `reference &sol; representation`, which has no defined meaning


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    xref:mp_units/Reference-0ba.adoc[Reference] R,
    typename Rep&gt;
requires RepresentationOf&lt;std&colon;&colon;remove&lowbar;cvref&lowbar;t&lt;Rep&gt;, get&lowbar;quantity&lowbar;spec(R&lcub;&rcub;)&gt;
constexpr
auto
xref:mp_units/operator_slash-04.adoc[operator&sol;](
    R r,
    Rep&& rep) = delete;
----

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

Rebinds a quantity to a reference obtained by dividing its own reference by `R`


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename FwdQ,
    xref:mp_units/Reference-0ba.adoc[Reference] R,
    xref:mp_units/Quantity-0c.adoc[Quantity] Q = std::remove&lowbar;cvref&lowbar;t&lt;FwdQ&gt;&gt;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/Quantity-0c.adoc[Quantity] auto
xref:mp_units/operator_slash-08.adoc[operator&sol;](
    FwdQ&& q,
    R r);
----

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

Constructs a quantity from a representation value and the inverse of a reference


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename FwdRep,
    xref:mp_units/Reference-0ba.adoc[Reference] R,
    xref:mp_units/RepresentationOf.adoc[RepresentationOf&lt;get&lowbar;quantity&lowbar;spec(R&lcub;&rcub;)&gt;] Rep = std::remove&lowbar;cvref&lowbar;t&lt;FwdRep&gt;&gt;
requires (!detail&colon;&colon;OffsetUnit&lt;decltype(get&lowbar;unit(R&lcub;&rcub;))&gt;)
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/Quantity-0c.adoc[Quantity] auto
xref:mp_units/operator_slash-06.adoc[operator&sol;](
    FwdRep&& lhs,
    R r);
----

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

Deprecated constructor of a quantity from a representation value and the inverse of an offset&hyphen;unit reference


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename FwdRep,
    xref:mp_units/Reference-0ba.adoc[Reference] R,
    xref:mp_units/RepresentationOf.adoc[RepresentationOf&lt;get&lowbar;quantity&lowbar;spec(R&lcub;&rcub;)&gt;] Rep = std::remove&lowbar;cvref&lowbar;t&lt;FwdRep&gt;&gt;
requires detail&colon;&colon;OffsetUnit&lt;decltype(get&lowbar;unit(R&lcub;&rcub;))&gt;
&lsqb;&lsqb;deprecated(&quot;2&period;3&period;0&colon; References using offset units (e&period;g&period;, temperatures) should be constructed with the &grave;delta&grave; or &grave;point&grave; helpers&quot;)&rsqb;&rsqb;
constexpr
auto
xref:mp_units/operator_slash-0c.adoc[operator&sol;](
    FwdRep&& lhs,
    R r);
----

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

== Return Value

* a reference resulting from dividing the quantity specification and the unit
* a reference resulting from dividing the quantity specifications and the units
* quantity holding the same numerical value as `q`, with reference `Q&colon;&colon;reference &sol; R&lcub;&rcub;`
* quantity of the inverse of reference `r` holding the value of `lhs`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *u1*
| the unit to divide
| *r*
| the reference to divide by
| *u2*
| the unit to divide by
| *r1*
| the reference to divide
| *r2*
| the reference to divide by
| *q*
| quantity operand (unused)
| *rep*
| representation operand (unused)
| *lhs*
| representation value to become the quantity&apos;s numerical value
|===


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