In this testcase:

int f(int,int);

template <class... T>
auto g(T... parms) -> decltype (f(parms...));

int main()
{
  return g(1,2);
}

We deduce the template argument types properly, but substituting them into the
return type fails because retrieve_local_specialization doesn't find a function
argument pack to use in the call to f.  I ran into the same issue with normal
parameters and just fudged around it by replacing the parameter with *(T*)NULL;
I would expect the same thing to work here, but so far I have failed to come up
with the right incantation to turn parms... into *(T*)NULL...


-- 
           Summary: function parameter pack expansion doesn't work in late-
                    specified return type
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jason at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37729

Reply via email to