template<typename T> void bar() {
S<T> s;
typename S<T>::Int x;
s.template foo<T>();
}
In p1858r0 at session 2.6
have you considered "template..." ( template dot dot dot ) as disambiguation token ?
template <typename Tuple>
int tuple_sum(Tuple t) {
return sum( t.template... elems);
}
2 - Have you thought on alias to variadic template template parameters ?
template<template<typename, typename> typename ... C >
struct X {
using ...D = C;
};
X<std::vector, std::list>::D...; // <- this is a variadic template template variadic argument list <std::vector, std::list>
3 - And about alias to variadic non type template parameters ?
template<int ... ints>
struct X {
static constexpr auto ...Ints = ints.[:]; // maybe ?
};
int x[] = { X<78, 90, 60>::Ints... }; // <- this is a variadic list of integers
3.1 - Can I apply a transform on each element ?
template<int ... ints>
struct X {
static constexpr auto ...Ints = ints.[:] + 1; // Apply a transform Int.[x] = ints.[x] + 1
};
int x[] = { X<78, 90, 60>::Ints... }; // <- this is a variadic list of integers x = { 79, 91, 61 }
int x[] = { (X<5, 10, 15>::Ints * 2)... }; // <- this is a variadic list of integers x = { 12, 22, 32 }
BR
Cleiton