Pack indexing was introduced in C++26 and I was hoping for this feature to have a significant impact on metaprogramming stuff, especially for indexing packs which would otherwise require workarounds.
Since the syntax for pack indexing specifier is:
typedef-name ... [ expression ]
- where
typedef-name
is eitheridentifier
orsimple-template-id
With the information above, does it allow to have like:
template <typename>
using apply_t = bool;
// #1
template <typename... Args>
using A = apply_t<Args>...[0];
// can be reworked with: apply_t<Args...[0]>
// #2
template <template <typename...> typename... Temps>
using B = Temps<>...[0]
// no other way other than this because 'Temps...[0]<>' is not allowed yet (?)