jeudi 25 mars 2021

Should I check if a vector is empty before I use std::transform

Would it be a good idea to check if a vector is empty or not before using std::transform and back_inserter or could nothing wrong happen since the vector.begin() will be the same as vector.end() and will not insert nothing in the new vector ?

Aucun commentaire:

Enregistrer un commentaire