mercredi 23 novembre 2022

Related type for the arguments of template function

How can I tell the compiler that U is equivalent to either std::vector<T> or T?

template<typename T, typename U> std::vector<T> foo(T t, U){return t;}

Aucun commentaire:

Enregistrer un commentaire