mercredi 1 juin 2016

What's the use of `std::tuple

Here (http://ift.tt/1Xgmw7B) user @Barry notes in the comment section that you can use std::tuple<int[2]> and that it is not apparently forbidden to instantiate such a type. I have not yet heard about this beast and I wonder what uses it could have, as opposed to storing a int var[2] directly or using std::array<int, 2>.

Reportedly, std::tuple<int[2]> is not copyable, neither movable nor construtable from an int var[2]. What other uses does it have?

Aucun commentaire:

Enregistrer un commentaire