|
|
|
|
|
by dataflow
1777 days ago
|
|
No you don't, you're massively exaggerating. The standard library already has at least basic if not strong exception-safety all over it. And RAII is pretty darn standard practice and guarantees basic exception safety in your own code too. You don't need strong exception safety here, just basic is sufficient for most such cases. Go try this with std::sort (or std::adjacent_find or whatever) and tell me which of their implementations you had to modify. |
|
Changing return type from "void" into some "result" is a mechanical change.