The following code snippet is IMHO wrongly accepted on mainline: ===================================================================== template<template<typename... T, typename = T> class U> struct A {}; =====================================================================
A slightly modified example ICE's: ===================================================================== template<template<typename... T, typename = T> class U> struct A { template<int> U<int> foo(); }; ===================================================================== bug.cc:3: internal compiler error: in tsubst, at cp/pt.c:8466 Please submit a full bug report, [etc.] -- Summary: [4.3 regression] Trouble with variadic templates as template-template parameter Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code, accepts-invalid, 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=34052