We can validate at compile time that an input to a function is a specialization of a template. I.E the following code validates that the input for f is some specialization of struct Holder.
template<typename T>
struct Holder<T> {...};
template<typename T>
void f(Holder<T> h) {...};
I want to validate that a set of variadic arguments are a specialization of a template. More precisely I want to differentiate between two consecutive sets of variadic arguments - a set which is a specialization of a template, and a set which isn't. Following is an example of how it might have looked like if the syntax allowed it to -
template<...Args1, ...Args2>
void f(Holder<Args1>.... args_which_are_specializations_of_Holder, Args2... args_which_are_not) {
use_holders(args_which_are_specializations_of_Holder...);
use_rest(args_which_are_not...);
return;
}
Is this possible ?
Thanks,