diff --git a/include/xo/unit/Quantity.hpp b/include/xo/unit/Quantity.hpp index d24f2589..604664b2 100644 --- a/include/xo/unit/Quantity.hpp +++ b/include/xo/unit/Quantity.hpp @@ -242,6 +242,16 @@ namespace xo { return Quantity::divide(x, y); } + /** note: won't have constexpr result until c++26 (when ::sqrt(), ::pow() are constexpr) + **/ + template + requires quantity2_concept && std::is_arithmetic_v + constexpr auto + operator/ (const Quantity & x, Dimensionless y) + { + return x.divide_by(y); + } + /** note: won't have constexpr result until c++26 (when ::sqrt(), ::pow() are constexpr) **/ template