mercredi 2 mars 2016

std::tuple vs std::array as items of a std::vector

I have this case:

std::vector<4_integers> v;


What would fit best here?

std::tuple solution:

std::vector<std::tuple<int,int,int,int>> v;


std::array solution:

std::vector<std::array<int,4>> v;

and why?

Aucun commentaire:

Enregistrer un commentaire