I was wondering if it was possible for a template (or any other tool you might recommend)to only take a type from a list of specific types (like an enum, but with already existing types). More specifically, if I have 3 classes, class A, class B and class C, and I'd like a function to be able to take any of those three classes as argument (but no other class than the 3), what should I do ? Should I use a template (if so how should I use it), or are there other tools for me to use ?
Aucun commentaire:
Enregistrer un commentaire