mardi 30 août 2016

Create alias for a list of types and passing it as a template parameter

I am using variadic templates to implement the visitor pattern, similarly to the implementation described in this answer. I have a lot of classes which must be visitable and several visitor classes, so I end up with a very long list of types when inheriting from the VisitableImpl and Visitor templates.

Since the same list of types would be used for both the Visitor and VisitableImpl, is there a more preferable, cleaner way to define an alias for it other than a preprocessor macro?

Aucun commentaire:

Enregistrer un commentaire