Variable length template arguments list?

后端 未结 4 1562
情话喂你
情话喂你 2021-02-01 10:03

I remember seing something like this being done:

template 
class X : public ListOfTypenames {};

that is, X inherits from

4条回答
  •  南旧
    南旧 (楼主)
    2021-02-01 10:31

    Sounds like you are referring to C++0x Variadic Templates. You can also achieve the same effect using Alexandrescu's TypeList construct from Loki.

    I believe the variadic template syntax in question would look like the following.

    template 
    class X : public T... {};
    

提交回复
热议问题