http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53609
Bug #: 53609
Summary: Wrong variadic template pack expansion
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
g++-4.7 missinterperts folowing code :
template<class...I> struct List{};
template<int I> struct Z{ static constexpr int value=I;};
template<int...I> using NumList = List< Z<I>... >;
template<class L>struct Mover;
template<template<class...>class C, class...I>
struct Mover<C<I...>>
{
using NL = NumList< I::value... > ; // aka : List< Z<I>... >
// missinterpreted as : List< Z<I...> >
};
using L=List< Z<1>,Z<2>,Z<3> >; // Works fine
using L2= NumList< 1,2,3 >; // Works also fine
Mover< L >::NL A; // dont work : should be 1 not 3 args in 'Z'