mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-03 20:34:26 +02:00
feat: equality comparison support added for references
This commit is contained in:
@@ -101,6 +101,12 @@ template<Representation Rep, Reference R>
|
||||
|
||||
void /*Use `q * (1 * r)` rather than `q * r`.*/ operator*(Quantity auto, Reference auto) = delete;
|
||||
|
||||
template<Reference R1, Reference R2>
|
||||
[[nodiscard]] consteval bool operator==(R1, R2)
|
||||
{
|
||||
return R1::dimension == R2::dimension && R1::unit == R2::unit;
|
||||
}
|
||||
|
||||
template<Reference R1, Reference R2>
|
||||
[[nodiscard]] consteval bool interconvertible(R1, R2)
|
||||
{
|
||||
|
Reference in New Issue
Block a user