Skip to content

Commit

Permalink
Fix known errors
Browse files Browse the repository at this point in the history
  • Loading branch information
chiphogg committed Jul 30, 2024
1 parent e2829de commit f088d54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/include/mp-units/framework/magnitude.h
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,11 @@ template<typename T>
}
}

const auto pow_result = checked_int_pow(static_cast<widen_t<T>>(get_base_value(el)), static_cast<uintmax_t>(exp.num));
const auto pow_result =
checked_int_pow(static_cast<widen_t<T>>(get_base_value(el)), static_cast<std::uintmax_t>(exp.num));
if (pow_result.has_value()) {
const auto final_result = (exp.den > 1) ? root(pow_result.value(), static_cast<uintmax_t>(exp.den)) : pow_result;
const auto final_result =
(exp.den > 1) ? root(pow_result.value(), static_cast<std::uintmax_t>(exp.den)) : pow_result;
if (final_result.has_value()) {
return final_result.value();
} else {
Expand Down
1 change: 1 addition & 0 deletions test/runtime/quantity_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import std;
#else
#include <atomic>
#include <numbers>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
Expand Down

0 comments on commit f088d54

Please sign in to comment.