It is good approach to use std::ignore
for ignoring unused variables.
So suppose I have a function like this -
void func(int i)
{
//for some reason, I don't need i anymore but I cannot change signature of function
std::ignore = i;
}
Aucun commentaire:
Enregistrer un commentaire