当前位置: 动力学知识库 > 问答 > 编程问答 >

c++ - Custom template argument binder to use with with template template class

问题描述:

This question already has an answer here:

  • Where and why do I have to put the “template” and “typename” keywords?

    5 answers

网友答案:

First of all, you probably meant Bind<B, D...>::arg instead of Bind<B, D...>::t in the code snippet.

Secondly, you need the template keyword, as Bind<B, D...> is a type-dependent id-expression. I.e.

template <class B, class ...D>
struct DD : public Parent<Bind<B, D...>::template arg, D...>
{ };
分享给朋友:
您可能感兴趣的文章:
随机阅读: