samedi 27 décembre 2014

Is it an undefined behavior? Could I exchange values without a temp?

Could I exchange two variables using tuple and tie?



int x, y;
....
std::tie(y, x) = std::make_tuple(x, y);

Aucun commentaire:

Enregistrer un commentaire