fork download
  1. struct TemplateTypeList0 {};
  2.  
  3. template<template<typename> class U>
  4. struct TemplateTypeSel
  5. {
  6. template<typename T>
  7. struct bind
  8. {
  9. typedef U<T> type;
  10. };
  11. };
  12.  
  13. template<template<typename T> class T1, template<typename T> class ...Args>
  14. struct VariadicTemplateTypeList
  15. {
  16. typedef TemplateTypeSel<T1> Head;
  17. typedef VariadicTemplateTypeList<Args...> Tail;
  18. };
  19. template<template<typename T> class T1>
  20. struct VariadicTemplateTypeList<T1>
  21. {
  22. typedef TemplateTypeSel<T1> Head;
  23. typedef TemplateTypeList0 Tail;
  24. };
  25.  
  26. template<template<typename T> class ...Args>
  27. struct Templates
  28. {
  29. typedef VariadicTemplateTypeList<Args...> type;
  30. };
  31.  
  32.  
  33.  
  34. template<typename T>
  35. struct Y
  36. {
  37. T v;
  38. };
  39.  
  40.  
  41. int main(void)
  42. {
  43. VariadicTemplateTypeList<Y, Y>::Head::bind<int>::type a;
  44. Templates<Y>::type::Head::bind<int>::type b;
  45. return 0;
  46. }
  47.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:17:42: sorry, unimplemented: cannot expand 'template<class T> class ... Args ...' into a fixed-length argument list
prog.cpp:29:42: sorry, unimplemented: cannot expand 'template<class T> class ... Args ...' into a fixed-length argument list
prog.cpp: In function 'int main()':
prog.cpp:44:22: error: '::Head' has not been declared
prog.cpp:44:32: error: expected initializer before '<' token
stdout
Standard output is empty