mp_units::operator==

Checks whether a reference is equal to a unit

Synopsis

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

template<Unit U2>
[[nodiscard]]
consteval
bool
operator==(
    reference r,
    U2 u2);

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 the reference's quantity specification and unit match those implied by u2

NOTE

The return value should not be discarded.

Parameters

NameDescription
rthe reference to compare
u2the unit to compare against