[#mp_units-operator_eq-0a] = xref:mp_units.adoc[mp_units]::operator== :relfileprefix: ../ :mrdocs: Equality operators == Synopses Declared in `<mp‐units/framework/quantity_character.h>` Compares two quantity characters lexicographically on (order, field) [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] constexpr bool operator==( xref:mp_units/quantity_character.adoc[quantity_character] lhs, xref:mp_units/quantity_character.adoc[quantity_character] rhs) = default; ---- [.small]#[_» more..._]# Checks whether a reference is equal to a unit [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] consteval bool xref:mp_units/operator_eq-02.adoc[operator==]( xref:mp_units/reference-0b2.adoc[reference] r, U2 u2); ---- [.small]#xref:mp_units/operator_eq-02.adoc[_» more..._]# Checks whether two references are equal [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] consteval bool xref:mp_units/operator_eq-07.adoc[operator==]( xref:mp_units/reference-0b2.adoc[reference] r1, xref:mp_units/reference-0b2.adoc[reference<Q2, U2>] r2); ---- [.small]#xref:mp_units/operator_eq-07.adoc[_» more..._]# == 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 https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | 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 |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#