This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/45873] Parameter packs not expanding consistently in function return types
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 16 May 2011 17:34:09 +0000
- Subject: [Bug c++/45873] Parameter packs not expanding consistently in function return types
- Auto-submitted: auto-generated
- References: <bug-45873-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45873
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-05-16 17:04:12 UTC ---
(In reply to comment #3)
> This seems like a dup of 35722.
Ah yes, it definitely is for the call to foo<p1> in my second example in
comment 2: modifying pt.c to always complain at the FIXME in
coerce_template_parms produces the "sorry" for the call to foo<p1>
45873.c2.cc: In function 'int main()':
45873.c2.cc:14:18: sorry, unimplemented: cannot expand 'Args ...' into a
fixed-length argument list
45873.c2.cc:14:18: error: no matching function for call to 'foo(int, double)'
45873.c2.cc:14:18: note: candidate is:
45873.c2.cc:8:6: note: template<template<class ...> class T, class ... Args>
T<Args ...> foo(Args ...)
45873.c2.cc:15:18: error: no matching function for call to 'foo(int, double)'
45873.c2.cc:15:18: note: candidate is:
45873.c2.cc:8:6: note: template<template<class ...> class T, class ... Args>
T<Args ...> foo(Args ...)
But that "sorry" isn't reached for foo<p2> or for any foo<pair> in the other
testcases.
I don't know if that means something else is going on there, or if it's just an
undiagnosed case of the same situation.