vendredi 11 mars 2022

How to genercize a function such that it accepts any Container?

I would like to do something like this

template <typename> 
void (T arg){
   
}

Such that I could pass in any container, like vector or list, but not any type that isn't a container. How would I achieve this?

Aucun commentaire:

Enregistrer un commentaire