[#mp_units-operator_star-00] = xref:mp_units.adoc[mp_units]::operator* :relfileprefix: ../ :mrdocs: Multiplication operators == Synopses Declared in `<mp‐units/framework/reference.h>` Multiplies a unit by a reference [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] consteval /* implementation-defined */ xref:mp_units/operator_star-02b.adoc[operator*]( U1 u1, xref:mp_units/reference-0b2.adoc[reference] r); ---- [.small]#xref:mp_units/operator_star-02b.adoc[_» more..._]# Multiplies a reference by a unit [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] consteval /* implementation-defined */ xref:mp_units/operator_star-0f.adoc[operator*]( xref:mp_units/reference-0b2.adoc[reference] r, U2 u2); ---- [.small]#xref:mp_units/operator_star-0f.adoc[_» more..._]# Multiplies two references [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] consteval /* implementation-defined */ xref:mp_units/operator_star-05.adoc[operator*]( xref:mp_units/reference-0b2.adoc[reference] r1, xref:mp_units/reference-0b2.adoc[reference<Q2, U2>] r2); ---- [.small]#xref:mp_units/operator_star-05.adoc[_» more..._]# Deleted overload rejecting `reference * quantity` in favor of `quantity * reference` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< xref:mp_units/Reference-0ba.adoc[Reference] R, typename Q> requires Quantity<std::remove_cvref_t<Q>> constexpr auto xref:mp_units/operator_star-0d.adoc[operator*]( R r, Q&& q) = delete; ---- [.small]#xref:mp_units/operator_star-0d.adoc[_» more..._]# Deleted overload rejecting `reference * representation` in favor of `representation * reference` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< xref:mp_units/Reference-0ba.adoc[Reference] R, typename Rep> requires RepresentationOf<std::remove_cvref_t<Rep>, get_quantity_spec(R{})> constexpr auto xref:mp_units/operator_star-0c.adoc[operator*]( R r, Rep&& rep) = delete; ---- [.small]#xref:mp_units/operator_star-0c.adoc[_» more..._]# Rebinds a quantity to a reference obtained by multiplying its own reference by `R` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename FwdQ, xref:mp_units/Reference-0ba.adoc[Reference] R, xref:mp_units/Quantity-0c.adoc[Quantity] Q = std::remove_cvref_t<FwdQ>> [[nodiscard]] constexpr xref:mp_units/Quantity-0c.adoc[Quantity] auto xref:mp_units/operator_star-022.adoc[operator*]( FwdQ&& q, R r); ---- [.small]#xref:mp_units/operator_star-022.adoc[_» more..._]# Constructs a quantity from a representation value and a reference [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename FwdRep, xref:mp_units/Reference-0ba.adoc[Reference] R, xref:mp_units/RepresentationOf.adoc[RepresentationOf<get_quantity_spec(R{})>] Rep = std::remove_cvref_t<FwdRep>> requires (!detail::OffsetUnit<decltype(get_unit(R{}))>) [[nodiscard]] constexpr xref:mp_units/quantity-01.adoc[quantity<R{}, Rep>] xref:mp_units/operator_star-06f.adoc[operator*]( FwdRep&& lhs, R r); ---- [.small]#xref:mp_units/operator_star-06f.adoc[_» more..._]# Deprecated constructor of a quantity from a representation value and an offset‐unit reference [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename FwdRep, xref:mp_units/Reference-0ba.adoc[Reference] R, xref:mp_units/RepresentationOf.adoc[RepresentationOf<get_quantity_spec(R{})>] Rep = std::remove_cvref_t<FwdRep>> requires detail::OffsetUnit<decltype(get_unit(R{}))> [[deprecated("2.3.0: References using offset units (e.g., temperatures) should be constructed with the `delta` or `point` helpers")]] constexpr auto xref:mp_units/operator_star-067.adoc[operator*]( FwdRep&& lhs, R r); ---- [.small]#xref:mp_units/operator_star-067.adoc[_» more..._]# == Return Value * a reference resulting from multiplying the quantity specification and the unit * a reference resulting from multiplying the quantity specifications and the units * quantity holding the same numerical value as `q`, with reference `Q::reference * R{}` * quantity of reference `r` holding the value of `lhs` == Parameters [cols="1,4"] |=== | Name| Description | *u1* | the unit to multiply | *r* | the reference to multiply by | *u2* | the unit to multiply by | *r1* | the reference to multiply | *r2* | the reference to multiply by | *q* | quantity operand (unused) | *rep* | representation operand (unused) | *lhs* | representation value to become the quantity's numerical value |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#