fork download
  1. struct TypeList0 {};
  2.  
  3.  
  4. template<typename T, typename ...Args>
  5. struct VariadicTypeList
  6. {
  7. typedef T Head;
  8. typedef VariadicTypeList<Args...> Tail;
  9. };
  10. template<typename T>
  11. struct VariadicTypeList<T>
  12. {
  13. typedef T Head;
  14. typedef TypeList0 Tail;
  15. };
  16.  
  17. template<typename ...Args>
  18. struct Types
  19. {
  20. typedef VariadicTypeList<Args...> type;
  21. };
  22.  
  23. int main(void)
  24. {
  25. VariadicTypeList<int, float>::Head c;
  26. Types<int, float>::type::Head d;
  27. return 0;
  28. }
  29.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:8:34: sorry, unimplemented: cannot expand 'Args ...' into a fixed-length argument list
prog.cpp:20:34: sorry, unimplemented: cannot expand 'Args ...' into a fixed-length argument list
prog.cpp: In function 'int main()':
prog.cpp:26:32: error: expected initializer before 'd'
stdout
Standard output is empty