fork download
  1. #include <iostream>
  2. #include <typeinfo>
  3. #include <cxxabi.h>
  4.  
  5. template <typename...> struct join;
  6.  
  7. template <template <typename...> class Tpl,
  8. template <typename...> class...,
  9. typename... Args>
  10. struct join<Tpl<Args...>...>
  11. {
  12. typedef Tpl<Args......> type;
  13. };
  14.  
  15. template <typename...> struct test {};
  16.  
  17. int main()
  18. {
  19. int status;
  20. std::cout << abi::__cxa_demangle(typeid(
  21. join
  22. <
  23. test<int, int, double>,
  24. test<double, char, test<int>>,
  25. test<double, double, const char>
  26. >::type).name(), 0, 0, &status) << std::endl;
  27.  
  28. return 0;
  29. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:10:25: error: expansion pattern 'Tpl<Args ...>' contains no argument packs
prog.cpp: In function 'int main()':
prog.cpp:21:9: error: incomplete type 'join<test<int, int, double>, test<double, char, test<int> >, test<double, double, const char> >' used in nested name specifier
stdout

Standard output is empty