forked from mpusz/mp-units
feat: equality comparison support added for reference
This commit is contained in:
@@ -115,6 +115,11 @@ struct reference {
|
|||||||
}
|
}
|
||||||
|
|
||||||
friend void /*Use `q * (1 * r)` rather than `q * r`.*/ operator*(Quantity auto, reference) = delete;
|
friend void /*Use `q * (1 * r)` rather than `q * r`.*/ operator*(Quantity auto, reference) = delete;
|
||||||
|
|
||||||
|
template<Reference R2>
|
||||||
|
[[nodiscard]] friend constexpr bool operator==(reference, R2) { return false; }
|
||||||
|
|
||||||
|
[[nodiscard]] friend constexpr bool operator==(reference, reference) { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// type traits
|
// type traits
|
||||||
|
Reference in New Issue
Block a user