mp_units::operator==

Checks whether two references are equal

Synopsis

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

template<
    typename Q2,
    typename U2>
[[nodiscard]]
consteval
bool
operator==(
    reference r1,
    reference<Q2, U2> r2);

NOTE

This function is a hidden friend of reference, declared only inside that class: it can be found only through argument-dependent lookup.

Return Value

true if both the quantity specifications and the units are equal

NOTE

The return value should not be discarded.

Parameters

NameDescription
r1the first reference to compare
r2the other reference to compare against