On 07/30/2014 11:09 AM, Paolo Carlini wrote:
+ /* Eg (c++/57397): + + template<class T1, class... Tn, class... Tm> + void foo(T1, Tn..., Tm...); + + int main() + { + foo(1, 2); + } */
I think we should accept this: T1 is int, Tn is {}, Tm is {int}.
+ template<class T1, class... Tn, class... Tm> + void foo(T1, Tn..., Tm...); + + int main() + { + foo(1); + } */
And we should accept this.
while (p && p != void_list_node) { - count++; + if (TREE_CODE (TREE_VALUE (p)) == TYPE_PACK_EXPANSION) + trailing_packs = true; + else + count++; p = TREE_CHAIN (p); }
Only a function parameter pack at the very end should trigger the "at least" message. Other packs don't matter.
Jason