JS:

variadic parameters are suppose to make life easier but it seems those don't work with templates.

template A(int L) { ... }

void foo(T)(string s, T t...)
{
   A!(t.length);

}

Try this:


template A(size_t L) {
    enum A = L;
}

void foo(T...)(string s, T t) {
    auto n = A!(t.length);
}

void main() {
    foo("x", 1, 2);
}


Bye,
bearophile

Reply via email to