Throw when reassigning
try { object = mayThrow(); } catch (const std::exception& exc) { //… } If mayThrow() actually throws, will the original object be untouched? Or is it better to do it this way? try { Object newObject = mayThrow(); object = std::move(newObject); } catch (const std::exception& exc) { //… } >Solution : Unless mayThrow() has direct… Read More Throw when reassigning