// { dg-do compile { target c++11 } } template struct is_same { static const bool value = false; }; template struct is_same { static const bool value = true; }; template struct Tuple {}; template struct Pair {}; template struct zip { template struct with { typedef Tuple...> type; // { dg-error "mismatched argument pack" } }; }; static_assert (is_same::with::type, Tuple, Pair > >::value, "zip"); typedef zip::with::type T2; // error: different number of arguments specified // for Args1 and Args2 template void f(Args...); template void g(Args... args) { f(const_cast(&args)...); // okay: ``Args'' and ``args'' are expanded f(5 ...); // { dg-error "contains no argument packs" } f(args); // { dg-error "parameter packs not expanded" } // { dg-message "args" "note" { target *-*-* } 36 } f(h(args...) + args...); // okay: first ``args'' expanded within h, second ``args'' expanded within f. }