From f088d544b30851beba8de124c8990f6b8c716699 Mon Sep 17 00:00:00 2001 From: Chip Hogg Date: Mon, 29 Jul 2024 20:43:06 -0400 Subject: [PATCH] Fix known errors --- src/core/include/mp-units/framework/magnitude.h | 6 ++++-- test/runtime/quantity_test.cpp | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/include/mp-units/framework/magnitude.h b/src/core/include/mp-units/framework/magnitude.h index b95fa03af..d16325283 100644 --- a/src/core/include/mp-units/framework/magnitude.h +++ b/src/core/include/mp-units/framework/magnitude.h @@ -439,9 +439,11 @@ template } } - const auto pow_result = checked_int_pow(static_cast>(get_base_value(el)), static_cast(exp.num)); + const auto pow_result = + checked_int_pow(static_cast>(get_base_value(el)), static_cast(exp.num)); if (pow_result.has_value()) { - const auto final_result = (exp.den > 1) ? root(pow_result.value(), static_cast(exp.den)) : pow_result; + const auto final_result = + (exp.den > 1) ? root(pow_result.value(), static_cast(exp.den)) : pow_result; if (final_result.has_value()) { return final_result.value(); } else { diff --git a/test/runtime/quantity_test.cpp b/test/runtime/quantity_test.cpp index ba1e472fe..151845a7a 100644 --- a/test/runtime/quantity_test.cpp +++ b/test/runtime/quantity_test.cpp @@ -25,6 +25,7 @@ import std; #else #include +#include #endif #ifdef MP_UNITS_MODULES import mp_units;