I am reading, Programming: Principle and Practice Using C++, and Bjarne suggest avoiding overuse of parentheses. Is there an eloquent way to structure the following if statement? Here is my code:
bool is_valid(string s)
{
if(!(s.size()>=8)) throw invalid_argument("Username must be 8 char or more");
return true;
}
Aucun commentaire:
Enregistrer un commentaire