http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46061
Summary: Variadic Template Templates: not expandable into
fixed-size argument list, Implementation Gap.
Product: gcc
Version: 4.5.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
Created attachment 22073
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22073
full demo for bug ( .ii-file <14 lines)
The following struct "type_list" marks a list of types, which is constructed as
a template template class with a variadic type list of template arguments:
template <typename H, template <typename> class T, template <typename> class...
R>
struct type_list
{
typedef type_list< T<H>, R... > tail;
};
template<typename H, template<typename> class T>
struct type_list<H,T> {};
The code (attached as variadic_templ_templ.ii) produces the following
error-message (identical for gcc 4.4 and 4.5.1):
"sorry, unimplemented: cannot expand ‘template<class> class ... R ...’ into a
fixed-length argument list"
No other flags than -v -save-temps -Wall -std=c++0x were used.