From 44a731d8682870c85f1829845cd920558e7ee09b Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Mon, 21 Oct 2024 13:46:30 +0100 Subject: [PATCH] Candidate fix code without "if constexpr" --- include/boost/mp11/detail/mp_count.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/mp11/detail/mp_count.hpp b/include/boost/mp11/detail/mp_count.hpp index 37b39ed..5848867 100644 --- a/include/boost/mp11/detail/mp_count.hpp +++ b/include/boost/mp11/detail/mp_count.hpp @@ -51,9 +51,9 @@ template constexpr std::size_t cx_count() std::size_t r = 0; - for( std::size_t i = 1; i < sizeof...(T) + 1; ++i ) + for( std::size_t i = 0; i < sizeof...(T); ++i ) { - r += a[ i ]; + r += a[ i+1 ]; } return r;