mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
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:
committed by
Tomasz Kamiński
parent
6190513486
commit
d6ed0658f7
@@ -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;
|
||||
}();
|
||||
|
||||
Reference in New Issue
Block a user