------- Comment #1 from reichelt at gcc dot gnu dot org  2008-04-20 19:42 
-------
Slightly simpler testcase:

================================================================
template<int, typename...> struct A {};

template<typename> struct B;

template<typename... T> struct B<A<1, T...> > {};

template<typename... T> struct B<A<sizeof...(T), T...> > {};

B<A<1, char> > b;
================================================================

This has been fixed on mainline by

2008-03-27  Douglas Gregor  <[EMAIL PROTECTED]>

        * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
        tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
        ending in a pack expansion, both of which can occur when
        substituting into a nested template.
        (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
        instantiating the sizeof...(X) form, make tsubst_copy do the work.
        * parser.c (cp_parser_template_parameter): Deal with unnamed
        non-type template parameter packs identified by pack expansions in
        the parameter type.

Doug, are you going to backport the patch to the 4.3 branch?


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doug dot gregor at gmail dot
                   |                            |com, reichelt at gcc dot gnu
                   |                            |dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-invalid-code
   Last reconfirmed|0000-00-00 00:00:00         |2008-04-20 19:42:14
               date|                            |
   Target Milestone|---                         |4.3.1


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

Reply via email to