template struct Interface; template struct Interface { static int accumulate() { return I; } }; template struct Interface { static int accumulate() { return I + Interface::accumulate(); } }; // Note: split this into a separate test if a // cxx_variadic_template_template_parameters feature is added. template struct eval { enum { Matched = 0 }; }; template class T, typename... U> struct eval > { enum { Matched = 1 }; }; template struct A { }; template struct B { }; template struct C { }; template struct D { }; // Note: This test assumes that a compiler supporting this feature // supports static_assert. Add a workaround if that does not hold. static_assert(eval >::Matched, "A Matches"); static_assert(eval >::Matched, "A Matches"); static_assert(eval >::Matched, "A Matches"); static_assert(eval >::Matched, "B Matches"); static_assert(eval >::Matched, "C Matches"); static_assert(eval >::Matched, "D Matches"); static_assert(eval >::Matched, "D Matches"); static_assert(eval >::Matched, "D Matches");