libstdc++: Reduce size static storage for __fwd_prod in mdspan.

This fixes an oversight in a previous commit that improved mdspan
related code. Because __size doesn't use __fwd_prod, __fwd_prod(__rank)
is not needed anymore. Hence, one can shrink the size of
__fwd_partial_prods.

libstdc++-v3/ChangeLog:

	* include/std/mdspan (__fwd_partial_prods): Reduce size of the
	array by 1 element.

Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
Signed-off-by: Luc Grosheintz <luc.grosheintz@gmail.com>
This commit is contained in:
Luc Grosheintz
2025-08-11 22:14:54 +02:00
committed by Tomasz Kamiński
parent 6190513486
commit d6ed0658f7

View File

@@ -274,8 +274,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
constexpr auto __fwd_partial_prods = [] consteval
{
constexpr size_t __rank = _Extents.size();
std::array<size_t, __rank + 1> __ret;
for(size_t __r = 0; __r < __rank + 1; ++__r)
std::array<size_t, __rank> __ret;
for(size_t __r = 0; __r < __rank; ++__r)
__ret[__r] = __static_prod<_Extents>(0, __r);
return __ret;
}();