diff --git a/include/boost/mp11/detail/mp_count.hpp b/include/boost/mp11/detail/mp_count.hpp index 2daed90..1e221ca 100644 --- a/include/boost/mp11/detail/mp_count.hpp +++ b/include/boost/mp11/detail/mp_count.hpp @@ -39,13 +39,13 @@ constexpr std::size_t cx_plus() template constexpr std::size_t cx_plus(T1 t1, T... t) { - return t1 + cx_plus(t...); + return static_cast(t1) + cx_plus(t...); } template constexpr std::size_t cx_plus(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T... t) { - return t1 + t2 + t3 + t4 + t5 + t6 + t7 + t8 + t9 + t10 + cx_plus(t...); + return static_cast(t1 + t2 + t3 + t4 + t5 + t6 + t7 + t8 + t9 + t10) + cx_plus(t...); } template class L, class... T, class V> struct mp_count_impl, V>