Suppose we have std::tuple<Ts*...> tuple;. One of the types is T* and a class U derives from T (polymorphically). How do we define
template <typename U> T* get(const std::tuple<Ts*...>&);
so that get<U>(tuple) returns std::get<T*>(tuple)? Of course, we want get<T>(tuple) to return std::get<T*>(tuple).
Aucun commentaire:
Enregistrer un commentaire