c++ - Is it possible to generate a parameter pack? -


consider following pseudo code :

template<class... t> struct worker : unique<t...>::type...{}; struct x{}; struct y{}; struct z{}; 

is possible write template unique such generates parameter pack consisting of unique types among ts, worker<x,y,x,z> directly derived x, y, z respectively ,in order, given ts non final classes?

afaik: no.

the problem type result of typedef directive, , typedef cannot alias packs. bother, , computations on packs require introducing wrapper type (such template <typename...> struct pack {};) able pass them around.


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

javascript - Preserving URL fragment through CAS sign-on -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -