mp_units::operator*¶
scaled_unit specializations have priority in this operation. This means that the library framework prevents passing it as an element to the derived_unit. In such case only the reference unit is passed to the derived unit and the magnitude remains outside forming another scaled unit as a result of the operation.
Synopses¶
Declared in <mp-units/framework/dimension.h>
template<Unit U1>
[[nodiscard]] consteval /* implementation-defined */ operator*(U1 lhs, reference rhs);
template<Unit U2>
[[nodiscard]] consteval /* implementation-defined */ operator*(reference lhs, U2 rhs);
scaled_unit specializations have priority in this operation. This means that the library framework prevents passing it as an element to the derived_unit. In such case only the reference unit is passed to the derived unit and the magnitude remains outside forming another scaled unit as a result of the operation.
template<Dimension Lhs, Dimension Rhs>
[[nodiscard]] consteval Dimension auto operator*(Lhs lhs, Rhs rhs);
scaled_unit specializations have priority in this operation. This means that the library framework prevents passing it as an element to the derived_unit. In such case only the reference unit is passed to the derived unit and the magnitude remains outside forming another scaled unit as a result of the operation.
template<Dimension Lhs, Dimension Rhs>
[[nodiscard]] consteval Dimension auto operator*(Lhs lhs, Rhs rhs);
scaled_unit specializations have priority in this operation. This means that the library framework prevents passing it as an element to the derived_unit. In such case only the reference unit is passed to the derived unit and the magnitude remains outside forming another scaled unit as a result of the operation.
template<Dimension Lhs, Dimension Rhs>
[[nodiscard]] consteval Dimension auto operator*(Lhs lhs, Rhs rhs);
template<Reference R, typename Q>
requires Quantity<std::remove_cvref_t<Q>>
constexpr auto operator*(R lhs, Q&& q) = delete;
template<Reference R, typename Rep>
requires RepresentationOf<std::remove_cvref_t<Rep>, get_quantity_spec(R{})>
constexpr auto operator*(R lhs, Rep && rhs) = delete;
template<typename Q2, typename U2>
[[nodiscard]] consteval /* implementation-defined */ operator*(reference lhs, reference<Q2, U2> rhs);
Multiplication operator
template<typename Value, auto R1, typename Rep1>
requires(!Quantity<Value>) && (!Reference<Value>) &&
ScalableResultOf<get_quantity_spec(R1), std::multiplies<>, const Value&, Rep1>
[[nodiscard]] constexpr Quantity auto operator*(Value const& val, quantity<R1, Rep1> const& q);
Multiplication operator
template<auto R1, typename Rep1, typename Value>
requires(!Quantity<Value>) && (!Reference<Value>) &&
ScalableResultOf<get_quantity_spec(R1), std::multiplies<>, Rep1, const Value&>
[[nodiscard]] constexpr Quantity auto operator*(quantity<R1, Rep1> const& q, Value const& val);
template<typename FwdQ, Reference R, Quantity Q = std::remove_cvref_t<FwdQ>>
[[nodiscard]] constexpr Quantity auto operator*(FwdQ&& q, R rhs);
Multiplication operator
template<typename FwdRep, Reference R, RepresentationOf<get_quantity_spec(R{})> Rep = std::remove_cvref_t<FwdRep>>
requires(!detail::OffsetUnit<decltype(get_unit(R{}))>)
[[nodiscard]] constexpr quantity<R{}, Rep> operator*(FwdRep && lhs, R r);
template<typename FwdRep, Reference R, 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
operator*(FwdRep && lhs, R r);
Multiplication operator
template<auto R1, typename Rep1, auto R2, typename Rep2>
requires InvocableQuantities<std::multiplies<>, quantity<R1, Rep1>, quantity<R2, Rep2>>
[[nodiscard]] constexpr Quantity auto operator*(quantity<R1, Rep1> const& lhs, quantity<R2, Rep2> const& rhs);