mp_units::operator+

Addition operator

Synopsis

Declared in <mp-units/framework/quantity_point.h>

template<
    auto R1,
    typename Rep1,
    auto R2,
    auto PO2,
    typename Rep2>
requires ReferenceOf<MP_UNITS_REMOVE_CONST(decltype(R1)), get_quantity_spec(PO2)>
[[nodiscard]]
constexpr
QuantityPoint auto
operator+(
    quantity<R1, Rep1> const& q,
    quantity_point<R2, PO2, Rep2> const& qp)
requires requires { q + qp.quantity_ref_from(PO2); };

NOTE

This function is a hidden friend of quantity_point, declared inside an implementation-defined base class: it can be found only through argument-dependent lookup.

Return Value

NOTE

The return value should not be discarded.

Parameters

NameDescription
qThe left operand
qpThe right operand