F
Ferdi Smit
I've never understood the rationale of allowing partial, but not
explicit specialization for classes at non-namespace scope. Ie.:
struct A {
template <typename T1, typename T2>
struct B {};
// this is not allowed:
template <>
struct B<int, float> {};
// but this IS:
template <typename T2>
struct B<int, T2> {};
};
What is the reason for this rule?
explicit specialization for classes at non-namespace scope. Ie.:
struct A {
template <typename T1, typename T2>
struct B {};
// this is not allowed:
template <>
struct B<int, float> {};
// but this IS:
template <typename T2>
struct B<int, T2> {};
};
What is the reason for this rule?