mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-02 11:54:27 +02:00
Fix known errors
This commit is contained in:
@@ -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()) {
|
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()) {
|
if (final_result.has_value()) {
|
||||||
return final_result.value();
|
return final_result.value();
|
||||||
} else {
|
} else {
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
import std;
|
import std;
|
||||||
#else
|
#else
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
#include <numbers>
|
||||||
#endif
|
#endif
|
||||||
#ifdef MP_UNITS_MODULES
|
#ifdef MP_UNITS_MODULES
|
||||||
import mp_units;
|
import mp_units;
|
||||||
|
Reference in New Issue
Block a user