I would like to understand how the standard determines which partial specialization to pick below. For example, does it have anything to do with number of template parameters in the specialization? Otherwise, how does it determine the "best-fit" match?
#include <cstdint>
template <int ...I>
struct Vector;
template <typename T>
struct Transform;
template <int x, int ...I>
struct Transform<Vector<x,x,I...>> {
using type = int;
};
template <int ...I>
struct Transform<Vector<I...>> {
using type = char;
};
int main() {
static_assert(sizeof(Transform<Vector<1,1,2>>::type) == 4);
}