mp_units::operator==

Equality operator

Synopsis

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

template<
    auto R1,
    typename Rep1,
    RepresentationOf<get_quantity_spec(R1)> Value>
requires ImplicitFromNumber<R1> && std::equality_comparable_with<Rep1, Value>
[[nodiscard]]
constexpr
bool
operator==(
    quantity<R1, Rep1> const& lhs,
    Value const& rhs);

NOTE

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

Return Value

true if the objects are equal, false otherwise

NOTE

The return value should not be discarded.

Parameters

NameDescription
lhsThe left operand
rhsThe right operand