diff --git a/include/utl/pipes/avg.h b/include/utl/pipes/avg.h index 221812f..5d81b36 100644 --- a/include/utl/pipes/avg.h +++ b/include/utl/pipes/avg.h @@ -17,7 +17,7 @@ struct avg_t { ++count; r.next(it); } - return sum / static_cast(count); + return static_cast(sum) / static_cast(count); } };