Is there a way (in C++ 11) to implement the following method:
template <typename T>
std::vector<T> makeTypedVector(void* array, int n)
{
//construct an std::vector of type T from the given array
}
I would share what I've tried but I have no clue on how to implement it :)
Edit:
Is the same method possible for arrays instead of std::vector?
Aucun commentaire:
Enregistrer un commentaire