I'm writing 2 overloads of a function, both of them with variadic template compile-time parameters. One should take symbols as the templates, the other strings. I want to constrain the template instantiation to these two cases. The best I came up with was this:
bool func(SYMBOLS...)() if(!is(typeof(SYMBOLS[0]) == string)) {
}
and
bool func(STRINGS...)() if(is(typeof(STRINGS[0]) == string)) {
}
Obviously this only checks the first template parameter, and while it works given the code I've written so far, I wish I could say "only for all strings" and "only for not all strings". Is there a way?