More fallout from the variadic templates on mainline:

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

struct B
{
  template <template <typename...> class C> B(C<int>);
};

B b = A<int>();
===========================================================

bug.cc:1: error: parameter packs not expanded with `...':
bug.cc:1: note:         'T'
bug.cc:1: error: parameter pack 'T' must be at the end of the template
parameter list
bug.cc: In instantiation of 'A<int>':
bug.cc:8:   instantiated from here
bug.cc:1: error: template argument 1 is invalid
bug.cc:1: error: template argument 1 is invalid
bug.cc:8: internal compiler error: tree check: expected class 'expression',
have 'type' (integer_type) in unify, at cp/pt.c:12616
Please submit a full bug report, [etc.]

Although this ICE is also in unify as PR31441, it's in a different location.


-- 
           Summary: [4.3 regression] ICE with variadic template and default
                    argument
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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

Reply via email to