diff --git a/include/boost/histogram/storage/adaptive_storage.hpp b/include/boost/histogram/storage/adaptive_storage.hpp index 4353d29c..78408d10 100644 --- a/include/boost/histogram/storage/adaptive_storage.hpp +++ b/include/boost/histogram/storage/adaptive_storage.hpp @@ -88,7 +88,8 @@ struct adaptive_storage { } template - using next_type = mp11::mp_at_c() + 1)>; + using next_type = mp11::mp_at_c() == 5 ? 5 : adaptive_storage::type_index() + 1)>; struct buffer_type { allocator_type alloc;