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?

Follow

tell me you'll never do that...

ok in your closet maybe, but not in generic code cmon, not in a libraryyyyy ToT

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.