template struct factorial { enum r { value = x * factorial::value }; }; template<> struct factorial<1> { enum r { value = 1 }; }; class seventwenty: factorial<6> { }; template class ternary { typedef void tp; }; template class ternary { typedef t tp; }; template class ternary { typedef f tp; }; template struct matches { enum { value = 1 }; }; template struct matches { enum { value = 2 }; }; template struct matches { enum { value = 2 }; }; template struct matches { enum { value = 2 }; }; template struct matches { enum { value = 3 }; };