I apologize, but I had a big problem in expressing the case in one sentence of the title.
The problem: I have a class template based on many "properties" (don't take this "property" keyword too literally):
template<typename ... P>
class C: public P... {}
Then I want separate, free function template that takes two instances and performs some call for each "property":
template<typename ... P>
void foo(C<P> &c1, C<P> &c2)
{
{ doSomething<p>()... } // for each type p in pack P
}
template<typename T>
void doSomething() {}
The problem is that P doesn't represent a set of my function arguments. Instead it parametrizes argument types. So I don't know how to write "expansion". Is such thing possible at all?