Matthias Kretz [Friday, 24 October 2025, 14:04:16 CEST]:
> > > >  #endif // __glibcxx_integer_sequence
> > > 
> > > This is defined for C++14 and later, but I think it can't actually be
> > > used for anything useful without C++26 packs introduced by structured
> > > bindings, right?
> > > 
> > > I wonder if we want to restrict the definition of _IndexPack to C++26?
> > 
> > I have defined my inital patch under #if __cpp_structured_bindings >=
> > 202411L,
> > i.e. auto [...ids] = is supported by the compiler, and I think this is the
> > right condition.
> > If this functionality will be made available as extension in previous
> > standard, _IndexPack
> > will also be useful.
> 
> My thinking was that this simple tool itself doesn't require C++26. You can
> also use it like this:
> 
> for (int i : _IndexPack<10>) { ... }

That said, it's incorrectly named. It really is an iota object or an index 
array. So _Iota<N> or _IndexArray<N>?

- Matthias

> So it can be useful even without __cpp_structured_bindings >= 202411L. But
> I'm happy either way, since I only need it in [simd]. ;-)
> 
> - Matthias


-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Center for Heavy Ion Research               https://gsi.de
 std::simd
──────────────────────────────────────────────────────────────────────────

Reply via email to