This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch] PR 57397
- From: Jason Merrill <jason at redhat dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 30 Jul 2014 13:19:03 -0400
- Subject: Re: [C++ Patch] PR 57397
- Authentication-results: sourceware.org; auth=none
- References: <53D7AF73 dot 2020507 at oracle dot com> <53D7C566 dot 9080509 at redhat dot com> <53D7CA87 dot 3050301 at oracle dot com> <53D7D23E dot 7020207 at redhat dot com> <53D90ABF dot 2080104 at oracle dot com>
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