fork download
  1. #include <iostream>
  2. #include <typeinfo>
  3. #include <cxxabi.h>
  4.  
  5. template <typename...> struct test {};
  6.  
  7. template <typename...> struct join;
  8.  
  9. template
  10. <
  11. template <typename... HeadArgs> class Head,
  12. template <typename... TailArgs> class...
  13. >
  14. struct join<class Head<typename HeadArgs...>, class Head<typename TailArgs...>...>
  15. {
  16. typedef typename Head<typename HeadArgs..., typename TailArgs......> result;
  17. };
  18.  
  19. int main()
  20. {
  21. int status;
  22. std::cout << abi::__cxa_demangle(typeid(join<test<int, int, char>, test<double, double char>, test<int>>::result).name(), 0, 0, &status) << std::endl;
  23.  
  24. return 0;
  25. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:14:79: error: expected parameter pack before '...'
prog.cpp: In function 'int main()':
prog.cpp:22:89: error: two or more data types in declaration of 'type name'
stdout
Standard output is empty