Variadic template deduction in variadic template template

后端 未结 1 1272
故里飘歌
故里飘歌 2021-02-08 11:02

I am not sure if the title makes much sense, but the example is actually quite staightforward:

// A converter struct with a generic constructor.
template 

        
相关标签:
1条回答
  • 2021-02-08 11:16

    This is not the solution, but might help you or others to figure out what the problem is. The following compiles:

    template <template <typename ...> class TT>
    struct converter2
    {
        template <typename Arg0, typename ... Args>    
        converter2(const TT<Arg0, Args ...> &);
    };
    
    // ...
    
    converter2<foo_variadic2>(foo_variadic2<int>{});
    

    I have to admit I don't understand why this is necessary and why your code doesn't work.

    0 讨论(0)
提交回复
热议问题