From 1caff7ffa929662f57fac1dbea24c3d2d95205f6 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 22 Oct 2024 19:50:32 +0300 Subject: [PATCH] Change second occurrence of the same code in mp_count.hpp to match --- 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 5848867..bc8aed9 100644 --- a/include/boost/mp11/detail/mp_count.hpp +++ b/include/boost/mp11/detail/mp_count.hpp @@ -98,9 +98,9 @@ template class P, class... T> 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;