language: C++11 (gcc-4.7.2)
date: 432 days 16 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <iostream>
#include <typeinfo>
#include <cxxabi.h>
 
template <typename...> struct join;
 
template <template <typename...> class Tpl,
          template <typename...> class...,
          typename... Args>
struct join<Tpl<Args...>...>
{
    typedef Tpl<Args......> type;
};
 
template <typename...> struct test {};
 
int main()
{
        int status;
    std::cout << abi::__cxa_demangle(typeid(
        join
        <
            test<int, int, double>,
            test<double, char, test<int>>,
            test<double, double, const char>
        >::type).name(), 0, 0, &status) << std::endl;
        
        return 0;
}
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