diff --git a/include/eve/module/core/regular/impl/average.hpp b/include/eve/module/core/regular/impl/average.hpp index 663c45e370..6aa4951c81 100644 --- a/include/eve/module/core/regular/impl/average.hpp +++ b/include/eve/module/core/regular/impl/average.hpp @@ -89,10 +89,10 @@ average_(EVE_SUPPORTS(cpu_), Ts... args) -> common_value_t { using r_t = common_value_t; - if constexpr(std::is_floating_point_v>) + using u_t = underlying_type_t; + if constexpr(std::is_floating_point_v) { - using elt_t = element_type_t; - elt_t invn = rec(elt_t(sizeof...(args) + 1u)); + u_t invn = rec(u_t(sizeof...(args) + 1u)); r_t that(a0 * invn); auto next = [invn](auto avg, auto x) { return fma(x, invn, avg); }; ((that = next(that, args)), ...);