File tree Expand file tree Collapse file tree
src/core/include/mp-units Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,6 +117,8 @@ template<typename T>
117117 return std::nullopt ;
118118 }
119119
120+ MP_UNITS_DIAGNOSTIC_PUSH
121+ MP_UNITS_DIAGNOSTIC_IGNORE_FLOAT_EQUAL
120122 // Handle special cases of zero and one.
121123 if (x == 0 || x == 1 ) {
122124 return x;
@@ -172,6 +174,7 @@ template<typename T>
172174 hi = mid;
173175 }
174176 }
177+ MP_UNITS_DIAGNOSTIC_POP
175178
176179 // Pick whichever one gets closer to the target.
177180 const auto lo_diff = xld - checked_int_pow (lo, n).value ();
Original file line number Diff line number Diff line change @@ -622,7 +622,10 @@ class quantity {
622622 using ct = std::common_type_t <quantity, quantity<R2 , Rep2>>;
623623 const ct ct_lhs (lhs);
624624 const ct ct_rhs (rhs);
625+ MP_UNITS_DIAGNOSTIC_PUSH
626+ MP_UNITS_DIAGNOSTIC_IGNORE_FLOAT_EQUAL
625627 return ct_lhs.numerical_value_ref_in (ct::unit) == ct_rhs.numerical_value_ref_in (ct::unit);
628+ MP_UNITS_DIAGNOSTIC_PUSH
626629 }
627630
628631 template <std::derived_from<quantity> Q, RepresentationOf<quantity_spec> Value>
You can’t perform that action at this time.
0 commit comments