Please explain me the rules for template specialization selection. I have an example:
template<typename T1, typename T2 = int>
struct S : false_type{};
template<typename T>
struct S<T, float> : true_type{};
cout << boolalpha << S<float>::value;
Why the output is false
? And in general, what happens with default template parameter typename T2 = int
in specialized classes? Does it introduces some influence?