Equality operators

Synopses

Declared in <mp‐units/framework/quantity_character.h>

Compares two quantity characters lexicographically on (order, field)

[[nodiscard]]
constexpr
bool
operator==(
    quantity_character lhs,
    quantity_character rhs) = default;

[» more...]

Checks whether a reference is equal to a unit

[[nodiscard]]
consteval
bool
operator==(
    reference r,
    U2 u2);

Checks whether two references are equal

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

Return Value

  • the lexicographic ordering of lhs and rhs

  • true if the reference's quantity specification and unit match those implied by u2

  • true if both the quantity specifications and the units are equal

Note

The return value should not be discarded.

Parameters

Name

Description

lhs

first quantity character to compare

rhs

second quantity character to compare

r

the reference to compare

u2

the unit to compare against

r1

the first reference to compare

r2

the other reference to compare against

Created with MrDocs