diff --git a/include/boost/mp11/detail/mp_count.hpp b/include/boost/mp11/detail/mp_count.hpp index 1e221ca..184f5bd 100644 --- a/include/boost/mp11/detail/mp_count.hpp +++ b/include/boost/mp11/detail/mp_count.hpp @@ -21,16 +21,7 @@ namespace mp11 namespace detail { -template struct mp_count_impl; - -#if defined( BOOST_MP11_HAS_FOLD_EXPRESSIONS ) - -template class L, class... T, class V> struct mp_count_impl, V> -{ - using type = mp_size_t<(std::is_same::value + ... + 0)>; -}; - -#elif !defined( BOOST_MP11_NO_CONSTEXPR ) +#if !defined( BOOST_MP11_NO_CONSTEXPR ) constexpr std::size_t cx_plus() { @@ -48,6 +39,19 @@ constexpr std::size_t cx_plus(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T return static_cast(t1 + t2 + t3 + t4 + t5 + t6 + t7 + t8 + t9 + t10) + cx_plus(t...); } +#endif + +template struct mp_count_impl; + +#if defined( BOOST_MP11_HAS_FOLD_EXPRESSIONS ) + +template class L, class... T, class V> struct mp_count_impl, V> +{ + using type = mp_size_t<(std::is_same::value + ... + 0)>; +}; + +#elif !defined( BOOST_MP11_NO_CONSTEXPR ) + template class L, class... T, class V> struct mp_count_impl, V> { using type = mp_size_t::value...)>; @@ -72,7 +76,7 @@ namespace detail template class P> struct mp_count_if_impl; -#if defined( BOOST_MP11_HAS_FOLD_EXPRESSIONS ) && !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1920 ) +#if defined( BOOST_MP11_HAS_FOLD_EXPRESSIONS ) && !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1930 ) template class L, class... T, template class P> struct mp_count_if_impl, P> {