Consider the code:
#include <iostream>
template <class... Ts>
struct outer {
template <class... ITs>
struct inner {
static constexpr bool value = false;
};
template <class... ITs>
struct inner<Ts..., ITs...> {
static constexpr bool value = true;
};
};
int main() {
std::cout << outer<int, float, double>::inner<int, float, double, int>::value << std::endl;
}
The code compiles with clang++ but not with g++ where it produces an error:
temp3.cc:11:11: error: parameter pack argument ‘Ts ...’ must be at the end of the template argument list
struct inner<Ts..., ITs...> { ^
As I've already established here partial specialisation of the inner class should be legit.
Edit: For completeness it is worth adding that clang for the above code warns that he might have a problem with deducing ITs parameters yet doing it without any problems...