would you write this
auto x = *it;
// modify it
if(error)
*it = x;
instead of this?
auto x = *it;
// modify x
if(ok)
*it = x;
like you think you are making a backup or something? who would do that? cmon...
in general would you make a copy and hold on to it unless you want to modify it? why?
ok in your closet maybe, but not in generic code cmon, not in a libraryyyyy ToT