Tomasz Kaminski [Friday, 24 October 2025, 17:40:40 CEST]:
> > #endif // __glibcxx_integer_sequence
> >
> > +#if __cpp_structured_bindings >= 202411L
> > +#if __has_builtin(__integer_pack)
> > + template <auto _Num, typename _Tp = decltype(_Num)>
> > + inline constexpr _Tp
> > + _IotaArray[_Num] = {__integer_pack(_Tp(_Num))...};
> > +#else
>
> This should be #elif __glibcxx_integer_sequence, we dependent on that.,
> Otherwise this looks good to me.
But then, shouldn't I rather move the `#endif // __glibcxx_integer_sequence`
from above below my code?
BTW, this is also useful/necessary for expansion statements:
template for (constexpr int __i : _IotaArray<10>)
...;
So rather guard it with the following?
__cpp_structured_bindings >= 202411L || __cpp_expansion_statements >= 202506L
- Matthias
--
──────────────────────────────────────────────────────────────────────────
Dr. Matthias Kretz https://mattkretz.github.io
GSI Helmholtz Center for Heavy Ion Research https://gsi.de
std::simd
──────────────────────────────────────────────────────────────────────────