mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-05 21:24:27 +02:00
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;
|
||||
|
||||
template<Reference R2>
|
||||
[[nodiscard]] friend constexpr bool operator==(reference, R2) { return false; }
|
||||
|
||||
[[nodiscard]] friend constexpr bool operator==(reference, reference) { return true; }
|
||||
};
|
||||
|
||||
// type traits
|
||||
|
Reference in New Issue
Block a user