lundi 26 janvier 2015

Making a forward_list of a variadic template class

I have a std::forward_list and a I have a class Delegate (taken from here) that has is a class with a variadic type signature (typename return_type, typename... Args).


I want to make a std::forward_list out of these Delegates. How would I go about doing so? I have tried:


std::forward_list<Delegate<void, typename...> > but it gives a syntax error. I would also like to add to this list later. I can guarantee that each of these lists (there will be multiple) will only have Delegate types that take the same number of parameters stored together. However, each list may have a list of methods that take different parameters than the methods in other lists.


These lists are actually going to be inside of a std::unordered_map.


Aucun commentaire:

Enregistrer un commentaire