[Bug c++/40155] New: [c++1x] variadic template pack problem

bangerth at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri May 15 02:55:00 GMT 2009


I'm fairly sure this should compile but it doesn't:
---------------------
template <typename T> struct identity
{  typedef T type;  };

template <typename RT, typename... A>
int forward_call(RT (*) (A...), typename identity<A>::type...);

int g (double);

int i = forward_call(&g, 0);
-------------------------------------

The problem is the expansion
  typename identity<A>::type...
which should wrap identity<An>::type around each element An of the
template pack A. I'm not entirely familiar with all the rules for
template packs yet, but I think that this should work, taking
the examples in
  http://www.jot.fm/issues/issue_2008_02/article2/
into account.

Best
 W.


-- 
           Summary: [c++1x] variadic template pack problem
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at gmail dot com


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



More information about the Gcc-bugs mailing list