This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/48424] C++0x parameter packs expansion problem
- 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, 18 Apr 2011 21:23:47 +0000
- Subject: [Bug c++/48424] C++0x parameter packs expansion problem
- Auto-submitted: auto-generated
- References: <bug-48424-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48424
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-04-18 21:23:46 UTC ---
Jason, when this bug is fixed will this be allowed too?
template<typename... Args1>
struct S
{
template<typename... Args2>
void f(Args1... args1, Args2&&... args2)
{
}
};
S<int, int> s;
Currently this gives:
var.cc:5:47: error: parameter packs must be at the end of the parameter list
But it seems like it should be ok since sizeof...(Args1) is fixed when calling
S::f and so shouldn't interfere with deducing Args2
(I wanted to do something of this form to make std::mem_fn support varargs
member functions such as R (T::*)(int, ...) where Args1 would be [int] and
Args2 would be the additional arguments passed to _Mem_fn::operator())