diff --git a/include/xo/unit/quantity_ops.hpp b/include/xo/unit/quantity_ops.hpp index 63be47c0..5b4513bb 100644 --- a/include/xo/unit/quantity_ops.hpp +++ b/include/xo/unit/quantity_ops.hpp @@ -47,6 +47,17 @@ namespace xo { { return (Quantity::compare(x, y) == 0); } + + /** note: won't have constexpr result until c++26 (when ::sqrt(), ::pow() are constexpr) + **/ + template + requires quantity2_concept && quantity2_concept + constexpr auto + operator<=> (const Quantity & x, const Quantity2 & y) + { + return Quantity::compare(x, y); + } + } /*namespace qty*/ } /*namespace xo*/ diff --git a/include/xo/unit/xquantity.hpp b/include/xo/unit/xquantity.hpp index 3d2606be..83f64d49 100644 --- a/include/xo/unit/xquantity.hpp +++ b/include/xo/unit/xquantity.hpp @@ -331,16 +331,6 @@ namespace xo { return Quantity(x, nu::dimensionless) - y; } - /** note: won't have constexpr result until c++26 (when ::sqrt(), ::pow() are constexpr) - **/ - template - requires quantity2_concept && quantity2_concept - constexpr auto - operator== (const Quantity & x, const Quantity2 & y) - { - return (Quantity::compare(x, y) == 0); - } - /** note: won't have constexpr result until c++26 (when ::sqrt(), ::pow() are constexpr) **/ template @@ -361,16 +351,6 @@ namespace xo { return (Quantity(x, nu::dimensionless) == y); } - /** note: won't have constexpr result until c++26 (when ::sqrt(), ::pow() are constexpr) - **/ - template - requires quantity2_concept && quantity2_concept - constexpr auto - operator<=> (const Quantity & x, const Quantity2 & y) - { - return Quantity::compare(x, y); - } - /** note: won't have constexpr result until c++26 (when ::sqrt(), ::pow() are constexpr) **/ template