mp_units::operator+

Addition operator

Synopsis

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

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

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
qpThe left operand
qThe right operand