diff options
Diffstat (limited to 'boost/histogram/algorithm/sum.hpp')
-rw-r--r-- | boost/histogram/algorithm/sum.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/boost/histogram/algorithm/sum.hpp b/boost/histogram/algorithm/sum.hpp index 63316adef3..5ff437dd6f 100644 --- a/boost/histogram/algorithm/sum.hpp +++ b/boost/histogram/algorithm/sum.hpp @@ -30,7 +30,7 @@ auto sum(const histogram<A, S>& h) { using T = typename histogram<A, S>::value_type; using Sum = mp11::mp_if<std::is_arithmetic<T>, accumulators::sum<double>, T>; Sum sum; - for (auto x : h) sum += x; + for (auto&& x : h) sum += x; using R = mp11::mp_if<std::is_arithmetic<T>, double, T>; return static_cast<R>(sum); } |